Neos\Fusion\Tests\Unit\Core\ParserTest::parserCorrectlyParsesFixture17 PHP Метод

parserCorrectlyParsesFixture17() публичный Метод

    public function parserCorrectlyParsesFixture17()
    {
        $fixture = __DIR__ . '/Fixtures/ParserTestTypoScriptFixture17.fusion';
        $sourceCode = file_get_contents($fixture, FILE_TEXT);
        $expectedParseTree = $this->getExpectedParseTreeForFixture16();
        // Check that values were overridden by fixture #17:
        $expectedParseTree['__prototypes']['TYPO3.Foo:Bar2']['baz'] = 'New Value';
        // Set the default namespace to Neos.Neos - that's what Neos does as well in Domain\Service\TypoScriptService:
        $this->parser->setObjectTypeNamespace('default', 'Neos.Neos');
        $text = array('__objectType' => 'Neos.Neos:Text', '__value' => null, '__eelExpression' => null);
        // Make sure that the namespace declaration for "default" is also available when fixture #17b is parsed:
        $expectedParseTree['object'] = $text;
        // Test normal globbing
        $expectedParseTree['globbing1'] = $text;
        $expectedParseTree['globbing2'] = $text;
        // Test recursive globbing
        $expectedParseTree['recursiveGlobbing1'] = $text;
        $expectedParseTree['recursiveGlobbing2'] = $text;
        $expectedParseTree['recursiveGlobbingUpTheTree'] = $text;
        // Test globbing with dots
        $expectedParseTree['globbingWithDots1'] = $text;
        $actualParseTree = $this->parser->parse($sourceCode, $fixture);
        $this->assertEquals($expectedParseTree, $actualParseTree, 'The parse tree was not as expected after parsing fixture 17');
    }