namespace Symfony\Component\AssetMapper\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\AssetMapper\AssetMapperRepository;
use Symfony\Component\Finder\Glob;
class AssetMapperRepositoryTest extends TestCase
{ public function testFindWithAbsolutePaths() { $repository =
new AssetMapperRepository([ __DIR__.'/fixtures/dir1' => '',
__DIR__.'/fixtures/dir2' => '',
], __DIR__
);
$this->
assertSame(realpath(__DIR__.'/fixtures/dir1/file1.css'
),
$repository->
find('file1.css'
));
$this->
assertSame(realpath(__DIR__.'/fixtures/dir2/file4.js'
),
$repository->
find('file4.js'
));
$this->
assertSame(realpath(__DIR__.'/fixtures/dir2/subdir/file5.js'
),
$repository->
find('subdir/file5.js'
));
$this->
assertNull($repository->
find('file5.css'
));
} public function testFindWithRelativePaths() {