Neos\Fusion\Tests\Unit\TypoScriptObjects\ResourceUriImplementationTest::evaluateIgnoresPackagePropertyIfAResourcePathIsGiven PHP Method

evaluateIgnoresPackagePropertyIfAResourcePathIsGiven() public method

    public function evaluateIgnoresPackagePropertyIfAResourcePathIsGiven()
    {
        $this->mockTsRuntime->expects($this->any())->method('evaluate')->will($this->returnCallback(function ($evaluatePath, $that) {
            $relativePath = str_replace('resourceUri/test/', '', $evaluatePath);
            switch ($relativePath) {
                case 'path':
                    return 'resource://Some.Package/Public/SomeResource';
                case 'package':
                    return 'Specified.Package';
            }
            return null;
        }));
        $this->mockActionRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue('Current.Package'));
        $this->mockResourceManager->expects($this->atLeastOnce())->method('getPublicPackageResourceUri')->will($this->returnValue('Static/Resources/Packages/Some.Package/SomeResource'));
        $this->assertSame('Static/Resources/Packages/Some.Package/SomeResource', $this->resourceUriImplementation->evaluate());
    }