BetterReflectionTest\Reflector\Exception\ParseToAstFailureTest::testFromLocatedSourceWithoutFilename PHP Method

testFromLocatedSourceWithoutFilename() public method

    public function testFromLocatedSourceWithoutFilename()
    {
        $locatedSource = new LocatedSource('<?php abc', null);
        $previous = new \Exception();
        $exception = ParseToAstFailure::fromLocatedSource($locatedSource, $previous);
        $this->assertInstanceOf(ParseToAstFailure::class, $exception);
        $this->assertSame('AST failed to parse in located source (first 20 characters: <?php abc)', $exception->getMessage());
        $this->assertSame($previous, $exception->getPrevious());
    }