Yaffs site version 1.1
[yaffs-website] / vendor / symfony / translation / Tests / TranslatorCacheTest.php
index 5bd0d34e64a639fe9baf310f5058f09c056b25d5..a60690f85115cacb2e66874c9467d9a9ad7f0368 100644 (file)
@@ -149,6 +149,17 @@ class TranslatorCacheTest extends TestCase
         $this->assertEquals('OK', $translator->trans($msgid), '-> the cache was overwritten by another translator instance in '.($debug ? 'debug' : 'production'));
     }
 
+    public function testGeneratedCacheFilesAreOnlyBelongRequestedLocales()
+    {
+        $translator = new Translator('a', null, $this->tmpDir);
+        $translator->setFallbackLocales(array('b'));
+        $translator->trans('bar');
+
+        $cachedFiles = glob($this->tmpDir.'/*.php');
+
+        $this->assertCount(1, $cachedFiles);
+    }
+
     public function testDifferentCacheFilesAreUsedForDifferentSetsOfFallbackLocales()
     {
         /*