diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-03 19:26:54 +0200 |
commit | 4f5b44bd3bd490309eb2ba7b44df4769816ba729 (patch) | |
tree | 6cefe170dfe0a5a361cb1e2d1fc4d580a3316d02 /vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/AbstractBundleTest.php | |
parent | 2b840e0cfb63a453bea67a98541f3df9c273c5f5 (diff) | |
download | wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.gz wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.tar.zst wallabag-4f5b44bd3bd490309eb2ba7b44df4769816ba729.zip |
twig implementation
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.php | 55 |
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 | |||
12 | namespace Symfony\Component\Intl\Tests\ResourceBundle; | ||
13 | |||
14 | /** | ||
15 | * @author Bernhard Schussek <bschussek@gmail.com> | ||
16 | */ | ||
17 | class 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 | } | ||