Ver Fonte

[ZF-11547] Zend_Cache

- Fix typo in r23330 that allow assign multiple 'master_files'.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24217 44c647ce-9c0f-0410-b52a-842ac1e357ba
ramon há 14 anos atrás
pai
commit
d2a9b6954b

+ 1 - 1
library/Zend/Cache/Frontend/File.php

@@ -123,7 +123,7 @@ class Zend_Cache_Frontend_File extends Zend_Cache_Core
             $this->_masterFile_mtimes[$i] = $mtime;
             $this->_specificOptions['master_files'][$i] = $masterFile;
             if ($i === 0) { // to keep a compatibility
-                $this->_specificOptions['master_files'] = $masterFile;
+                $this->_specificOptions['master_file'] = $masterFile;
             }
 
             $i++;

+ 9 - 2
tests/Zend/Cache/FileFrontendTest.php

@@ -223,6 +223,13 @@ class Zend_Cache_FileFrontendTest extends PHPUnit_Framework_TestCase {
         $this->assertEquals('foo', $this->_instance1->load('cache_id', true));
     }
 
-}
-
+    /**
+     * @group ZF-11547
+     */
+    public function testMultipleMasterFiles()
+    {
+        $this->assertEquals(2, count($this->_instance3->getOption('master_files')));
+        $this->assertNotNull($this->_instance3->getOption('master_file'));
+    }
 
+}