ZF-8222: format class name for class checks
[zend.git] / tests / Zend / Cache / ZendServerDiskTest.php
blobe46fb4617d442036829e08b7c66594402549eb50
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Cache
17 * @subpackage UnitTests
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id$
23 /**
24 * Zend_Cache
26 require_once 'Zend/Cache.php';
27 require_once 'Zend/Cache/Backend/ZendServer/Disk.php';
29 /**
30 * Common tests for backends
32 require_once 'CommonBackendTest.php';
34 /**
35 * PHPUnit test case
37 require_once 'PHPUnit/Framework/TestCase.php';
39 /**
40 * @category Zend
41 * @package Zend_Cache
42 * @subpackage UnitTests
43 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
44 * @license http://framework.zend.com/license/new-bsd New BSD License
45 * @group Zend_Cache
47 class Zend_Cache_ZendServerDiskTest extends Zend_Cache_CommonBackendTest {
49 protected $_instance;
51 public function __construct($name = null, array $data = array(), $dataName = '')
53 parent::__construct('Zend_Cache_Backend_ZendServer_Disk', $data, $dataName);
56 public function setUp($notag = true)
58 $this->_instance = new Zend_Cache_Backend_ZendServer_Disk();
59 parent::setUp(true);
62 public function tearDown()
64 parent::tearDown();
65 unset($this->_instance);
68 public function testConstructorCorrectCall()
70 $test = new Zend_Cache_Backend_ZendServer_Disk();
73 public function testCleanModeOld() {
74 $this->_instance->setDirectives(array('logging' => false));
75 $this->_instance->clean('old');
76 // do nothing, just to see if an error occured
77 $this->_instance->setDirectives(array('logging' => true));
80 public function testCleanModeMatchingTags() {
81 $this->_instance->setDirectives(array('logging' => false));
82 $this->_instance->clean('matchingTag', array('tag1'));
83 // do nothing, just to see if an error occured
84 $this->_instance->setDirectives(array('logging' => true));
87 public function testCleanModeNotMatchingTags() {
88 $this->_instance->setDirectives(array('logging' => false));
89 $this->_instance->clean('notMatchingTag', array('tag1'));
90 // do nothing, just to see if an error occured
91 $this->_instance->setDirectives(array('logging' => true));
94 // Because of limitations of this backend...
95 public function testGetWithAnExpiredCacheId() {}
96 public function testCleanModeMatchingTags2() {}
97 public function testCleanModeNotMatchingTags2() {}
98 public function testCleanModeNotMatchingTags3() {}
99 public function testSaveCorrectCall()
101 $this->_instance->setDirectives(array('logging' => false));
102 parent::testSaveCorrectCall();
103 $this->_instance->setDirectives(array('logging' => true));
106 public function testSaveWithNullLifeTime()
108 $this->_instance->setDirectives(array('logging' => false));
109 parent::testSaveWithNullLifeTime();
110 $this->_instance->setDirectives(array('logging' => true));
113 public function testSaveWithSpecificLifeTime()
116 $this->_instance->setDirectives(array('logging' => false));
117 parent::testSaveWithSpecificLifeTime();
118 $this->_instance->setDirectives(array('logging' => true));