Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..
Decoded Output download
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
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(
'/assets-prefix/',
);
$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(
'/assets-prefix', // The trailing slash should be added automatically
);
$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'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
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(
'/assets-prefix/',
);
$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(
'/assets-prefix', // The trailing slash should be added automatically
);
$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'));
}
}
Function Calls
None |
Stats
MD5 | 674401f7e6128d71bdedd72ce63eca2d |
Eval Count | 0 |
Decode Time | 103 ms |