aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php')
-rw-r--r--vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php55
1 files changed, 55 insertions, 0 deletions
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 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Intl\Tests\ResourceBundle;
13
14/**
15 * @author Bernhard Schussek <bschussek@gmail.com>
16 */
17class AbstractBundleTest extends \PHPUnit_Framework_TestCase
18{
19 const RES_DIR = '/base/dirName';
20
21 /**
22 * @var \Symfony\Component\Intl\ResourceBundle\AbstractBundle
23 */
24 private $bundle;
25
26 /**
27 * @var \PHPUnit_Framework_MockObject_MockObject
28 */
29 private $reader;
30
31 protected function setUp()
32 {
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)
37 );
38
39 $this->bundle->expects($this->any())
40 ->method('getDirectoryName')
41 ->will($this->returnValue('dirName'));
42 }
43
44 public function testGetLocales()
45 {
46 $locales = array('de', 'en', 'fr');
47
48 $this->reader->expects($this->once())
49 ->method('getLocales')
50 ->with(self::RES_DIR)
51 ->will($this->returnValue($locales));
52
53 $this->assertSame($locales, $this->bundle->getLocales());
54 }
55}