public function KernelTest::testLocateResourceReturnsTheFirstThatMatchesWithParent in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/Tests/KernelTest.php \Symfony\Component\HttpKernel\Tests\KernelTest::testLocateResourceReturnsTheFirstThatMatchesWithParent()
File
- vendor/
symfony/ http-kernel/ Tests/ KernelTest.php, line 440
Class
Namespace
Symfony\Component\HttpKernel\TestsCode
public function testLocateResourceReturnsTheFirstThatMatchesWithParent() {
$parent = $this
->getBundle(__DIR__ . '/Fixtures/Bundle1Bundle');
$child = $this
->getBundle(__DIR__ . '/Fixtures/Bundle2Bundle');
$kernel = $this
->getKernel(array(
'getBundle',
));
$kernel
->expects($this
->exactly(2))
->method('getBundle')
->will($this
->returnValue(array(
$child,
$parent,
)));
$this
->assertEquals(__DIR__ . '/Fixtures/Bundle2Bundle/foo.txt', $kernel
->locateResource('@ParentAABundle/foo.txt'));
$this
->assertEquals(__DIR__ . '/Fixtures/Bundle1Bundle/bar.txt', $kernel
->locateResource('@ParentAABundle/bar.txt'));
}