namespace Symfony\Component\AssetMapper\Tests\Path;
use PHPUnit\Framework\TestCase;
use Symfony\Component\AssetMapper\Path\PublicAssetsPathResolver;
class PublicAssetsPathResolverTest extends TestCase
{ public function testResolvePublicPath() { $resolver =
new PublicAssetsPathResolver( '/projectRootDir/',
'/assets-prefix/',
'publicDirName',
);
$this->
assertSame('/assets-prefix/',
$resolver->
resolvePublicPath(''
));
$this->
assertSame('/assets-prefix/foo/bar',
$resolver->
resolvePublicPath('/foo/bar'
));
$this->
assertSame('/assets-prefix/foo/bar',
$resolver->
resolvePublicPath('foo/bar'
));
$resolver =
new PublicAssetsPathResolver( '/projectRootDir/',
'/assets-prefix', // The trailing slash should be added automatically