浏览代码

cache tests: don't call clean on a non existing instance on tearDown

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21222 44c647ce-9c0f-0410-b52a-842ac1e357ba
mabe 16 年之前
父节点
当前提交
864bc69781
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tests/Zend/Cache/CommonBackendTest.php

+ 3 - 1
tests/Zend/Cache/CommonBackendTest.php

@@ -98,7 +98,9 @@ abstract class Zend_Cache_CommonBackendTest extends PHPUnit_Framework_TestCase {
 
     public function tearDown()
     {
-        $this->_instance->clean();
+        if ($this->_instance) {
+            $this->_instance->clean();
+        }
         $this->rmdir();
     }