Browse Source

ZF-8809: added cache cleaning to DateObject test

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20264 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 years ago
parent
commit
2ee51ba220
1 changed files with 3 additions and 2 deletions
  1. 3 2
      tests/Zend/Date/DateObjectTest.php

+ 3 - 2
tests/Zend/Date/DateObjectTest.php

@@ -46,15 +46,16 @@ class Zend_Date_DateObjectTest extends PHPUnit_Framework_TestCase
         $this->originalTimezone = date_default_timezone_get();
         date_default_timezone_set('Europe/Paris');
         require_once 'Zend/Cache.php';
-        $cache = Zend_Cache::factory('Core', 'File',
+        $this->_cache = Zend_Cache::factory('Core', 'File',
                  array('lifetime' => 120, 'automatic_serialization' => true),
                  array('cache_dir' => dirname(__FILE__) . '/../_files/'));
-        Zend_Date_DateObjectTestHelper::setOptions(array('cache' => $cache));
+        Zend_Date_DateObjectTestHelper::setOptions(array('cache' => $this->_cache));
     }
 
     public function tearDown()
     {
         date_default_timezone_set($this->originalTimezone);
+        $this->_cache->clean(Zend_Cache::CLEANING_MODE_ALL);
     }
 
     /**