public function testThrowsAnExceptionWhenInvalidTypeGiven() { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('foo is not a valid identifier type'); new IdentifierType('foo'); }