You are here

public function KernelTest::testLocateResourceReturnsAllMatches in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/KernelTest.php \Symfony\Component\HttpKernel\Tests\KernelTest::testLocateResourceReturnsAllMatches()

File

vendor/symfony/http-kernel/Tests/KernelTest.php, line 456

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testLocateResourceReturnsAllMatches() {
  $parent = $this
    ->getBundle(__DIR__ . '/Fixtures/Bundle1Bundle');
  $child = $this
    ->getBundle(__DIR__ . '/Fixtures/Bundle2Bundle');
  $kernel = $this
    ->getKernel(array(
    'getBundle',
  ));
  $kernel
    ->expects($this
    ->once())
    ->method('getBundle')
    ->will($this
    ->returnValue(array(
    $child,
    $parent,
  )));
  $this
    ->assertEquals(array(
    __DIR__ . '/Fixtures/Bundle2Bundle/foo.txt',
    __DIR__ . '/Fixtures/Bundle1Bundle/foo.txt',
  ), $kernel
    ->locateResource('@Bundle1Bundle/foo.txt', null, false));
}