4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Intl\Tests\ResourceBundle
;
15 * @author Bernhard Schussek <bschussek@gmail.com>
17 class AbstractBundleTest
extends \PHPUnit_Framework_TestCase
19 const RES_DIR
= '/base/dirName';
22 * @var \Symfony\Component\Intl\ResourceBundle\AbstractBundle
27 * @var \PHPUnit_Framework_MockObject_MockObject
31 protected function setUp()
33 $this->reader
= $this->getMock('Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReaderInterface');
34 $this->bundle
= $this->getMockForAbstractClass(
35 'Symfony\Component\Intl\ResourceBundle\AbstractBundle',
36 array(self
::RES_DIR
, $this->reader
)
39 $this->bundle
->expects($this->any())
40 ->method('getDirectoryName')
41 ->will($this->returnValue('dirName'));
44 public function testGetLocales()
46 $locales = array('de', 'en', 'fr');
48 $this->reader
->expects($this->once())
49 ->method('getLocales')
51 ->will($this->returnValue($locales));
53 $this->assertSame($locales, $this->bundle
->getLocales());