public function evaluateUsesSpecifiedPackageIfARelativePathIsGiven()
{
$this->mockTsRuntime->expects($this->any())->method('evaluate')->will($this->returnCallback(function ($evaluatePath, $that) {
$relativePath = str_replace('resourceUri/test/', '', $evaluatePath);
switch ($relativePath) {
case 'path':
return 'Relative/Resource/Path';
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/Specified.Package/Relative/Resource/Path'));
$this->assertSame('Static/Resources/Packages/Specified.Package/Relative/Resource/Path', $this->resourceUriImplementation->evaluate());
}