public function testFindReflectionsOfTypeThrowsParseToAstFailureExceptionWithInvalidCode()
{
$locator = new Locator();
$phpCode = '<?php syntax error';
$identifierType = new IdentifierType(IdentifierType::IDENTIFIER_CLASS);
$sourceLocator = new StringSourceLocator($phpCode);
$reflector = new ClassReflector($sourceLocator);
$locatedSource = new LocatedSource($phpCode, null);
$this->expectException(ParseToAstFailure::class);
$locator->findReflectionsOfType($reflector, $locatedSource, $identifierType);
}