public function testLocateResourceOnDirectories() {
$kernel = $this
->getKernel();
$kernel
->expects($this
->exactly(2))
->method('getBundle')
->will($this
->returnValue(array(
$this
->getBundle(__DIR__ . '/Fixtures/FooBundle', null, null, 'FooBundle'),
)));
$this
->assertEquals(__DIR__ . '/Fixtures/Resources/FooBundle/', $kernel
->locateResource('@FooBundle/Resources/', __DIR__ . '/Fixtures/Resources'));
$this
->assertEquals(__DIR__ . '/Fixtures/Resources/FooBundle', $kernel
->locateResource('@FooBundle/Resources', __DIR__ . '/Fixtures/Resources'));
$kernel = $this
->getKernel();
$kernel
->expects($this
->exactly(2))
->method('getBundle')
->will($this
->returnValue(array(
$this
->getBundle(__DIR__ . '/Fixtures/Bundle1Bundle', null, null, 'Bundle1Bundle'),
)));
$this
->assertEquals(__DIR__ . '/Fixtures/Bundle1Bundle/Resources/', $kernel
->locateResource('@Bundle1Bundle/Resources/'));
$this
->assertEquals(__DIR__ . '/Fixtures/Bundle1Bundle/Resources', $kernel
->locateResource('@Bundle1Bundle/Resources'));
}