From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- .../Tests/ResourceBundle/AbstractBundleTest.php | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php') diff --git a/vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php b/vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php new file mode 100644 index 00000000..6b075865 --- /dev/null +++ b/vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Intl\Tests\ResourceBundle; + +/** + * @author Bernhard Schussek + */ +class AbstractBundleTest extends \PHPUnit_Framework_TestCase +{ + const RES_DIR = '/base/dirName'; + + /** + * @var \Symfony\Component\Intl\ResourceBundle\AbstractBundle + */ + private $bundle; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + private $reader; + + protected function setUp() + { + $this->reader = $this->getMock('Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReaderInterface'); + $this->bundle = $this->getMockForAbstractClass( + 'Symfony\Component\Intl\ResourceBundle\AbstractBundle', + array(self::RES_DIR, $this->reader) + ); + + $this->bundle->expects($this->any()) + ->method('getDirectoryName') + ->will($this->returnValue('dirName')); + } + + public function testGetLocales() + { + $locales = array('de', 'en', 'fr'); + + $this->reader->expects($this->once()) + ->method('getLocales') + ->with(self::RES_DIR) + ->will($this->returnValue($locales)); + + $this->assertSame($locales, $this->bundle->getLocales()); + } +} -- cgit v1.2.3