Neos\Fusion\Tests\Unit\TypoScriptObjects\AttributesImplementationTest::evaluateTests PHP Method

evaluateTests() public method

public evaluateTests ( $properties, $expectedOutput )
    public function evaluateTests($properties, $expectedOutput)
    {
        $path = 'attributes/test';
        $this->mockTsRuntime->expects($this->any())->method('evaluate')->will($this->returnCallback(function ($evaluatePath, $that) use($path, $properties) {
            $relativePath = str_replace($path . '/', '', $evaluatePath);
            return ObjectAccess::getPropertyPath($properties, str_replace('/', '.', $relativePath));
        }));
        $typoScriptObjectName = 'Neos.Fusion:Attributes';
        $renderer = new AttributesImplementation($this->mockTsRuntime, $path, $typoScriptObjectName);
        if ($properties !== null) {
            foreach ($properties as $name => $value) {
                ObjectAccess::setProperty($renderer, $name, $value);
            }
        }
        $result = $renderer->evaluate();
        $this->assertEquals($expectedOutput, $result);
    }