Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

Application modulaire fonctionnelle !

Emmanuel ROY authored on 12/08/2019 15:10:25
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,51 +0,0 @@
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\Translation\Tests\Loader;
13
-
14
-use Symfony\Component\Config\Resource\DirectoryResource;
15
-use Symfony\Component\Translation\Loader\IcuResFileLoader;
16
-
17
-/**
18
- * @requires extension intl
19
- */
20
-class IcuResFileLoaderTest extends LocalizedTestCase
21
-{
22
-    public function testLoad()
23
-    {
24
-        // resource is build using genrb command
25
-        $loader = new IcuResFileLoader();
26
-        $resource = __DIR__.'/../fixtures/resourcebundle/res';
27
-        $catalogue = $loader->load($resource, 'en', 'domain1');
28
-
29
-        $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1'));
30
-        $this->assertEquals('en', $catalogue->getLocale());
31
-        $this->assertEquals([new DirectoryResource($resource)], $catalogue->getResources());
32
-    }
33
-
34
-    /**
35
-     * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException
36
-     */
37
-    public function testLoadNonExistingResource()
38
-    {
39
-        $loader = new IcuResFileLoader();
40
-        $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1');
41
-    }
42
-
43
-    /**
44
-     * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException
45
-     */
46
-    public function testLoadInvalidResource()
47
-    {
48
-        $loader = new IcuResFileLoader();
49
-        $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1');
50
-    }
51
-}
Browse code

initial commit

Emmanuel ROY authored on 09/08/2019 08:39:02
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,51 @@
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\Translation\Tests\Loader;
13
+
14
+use Symfony\Component\Config\Resource\DirectoryResource;
15
+use Symfony\Component\Translation\Loader\IcuResFileLoader;
16
+
17
+/**
18
+ * @requires extension intl
19
+ */
20
+class IcuResFileLoaderTest extends LocalizedTestCase
21
+{
22
+    public function testLoad()
23
+    {
24
+        // resource is build using genrb command
25
+        $loader = new IcuResFileLoader();
26
+        $resource = __DIR__.'/../fixtures/resourcebundle/res';
27
+        $catalogue = $loader->load($resource, 'en', 'domain1');
28
+
29
+        $this->assertEquals(['foo' => 'bar'], $catalogue->all('domain1'));
30
+        $this->assertEquals('en', $catalogue->getLocale());
31
+        $this->assertEquals([new DirectoryResource($resource)], $catalogue->getResources());
32
+    }
33
+
34
+    /**
35
+     * @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException
36
+     */
37
+    public function testLoadNonExistingResource()
38
+    {
39
+        $loader = new IcuResFileLoader();
40
+        $loader->load(__DIR__.'/../fixtures/non-existing.txt', 'en', 'domain1');
41
+    }
42
+
43
+    /**
44
+     * @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException
45
+     */
46
+    public function testLoadInvalidResource()
47
+    {
48
+        $loader = new IcuResFileLoader();
49
+        $loader->load(__DIR__.'/../fixtures/resourcebundle/corrupted', 'en', 'domain1');
50
+    }
51
+}