4
* @subpackage UnitTests
10
require_once 'Zend/Cache.php';
11
require_once 'Zend/Cache/Backend/Apc.php';
14
* Common tests for backends
16
require_once 'CommonExtendedBackendTest.php';
21
require_once 'PHPUnit/Framework/TestCase.php';
25
* @subpackage UnitTests
27
class Zend_Cache_ApcBackendTest extends Zend_Cache_CommonExtendedBackendTest {
31
public function __construct($name = null, array $data = array(), $dataName = '')
33
parent::__construct('Zend_Cache_Backend_Apc', $data, $dataName);
36
public function setUp($notag = true)
38
$this->_instance = new Zend_Cache_Backend_Apc(array());
39
parent::setUp($notag);
42
public function tearDown()
45
unset($this->_instance);
48
public function testConstructorCorrectCall()
50
$test = new Zend_Cache_Backend_Apc();
53
public function testCleanModeOld() {
54
$this->_instance->setDirectives(array('logging' => false));
55
$this->_instance->clean('old');
56
// do nothing, just to see if an error occured
57
$this->_instance->setDirectives(array('logging' => true));
60
public function testCleanModeMatchingTags() {
61
$this->_instance->setDirectives(array('logging' => false));
62
$this->_instance->clean('matchingTag', array('tag1'));
63
// do nothing, just to see if an error occured
64
$this->_instance->setDirectives(array('logging' => true));
67
public function testCleanModeNotMatchingTags() {
68
$this->_instance->setDirectives(array('logging' => false));
69
$this->_instance->clean('notMatchingTag', array('tag1'));
70
// do nothing, just to see if an error occured
71
$this->_instance->setDirectives(array('logging' => true));
74
// Because of limitations of this backend...
75
public function testGetWithAnExpiredCacheId() {}
76
public function testCleanModeMatchingTags2() {}
77
public function testCleanModeNotMatchingTags2() {}
78
public function testCleanModeNotMatchingTags3() {}
79
public function testGetIdsMatchingTags() {}
80
public function testGetIdsMatchingTags2() {}
81
public function testGetIdsMatchingTags3() {}
82
public function testGetIdsMatchingTags4() {}
83
public function testGetIdsNotMatchingTags() {}
84
public function testGetIdsNotMatchingTags2() {}
85
public function testGetIdsNotMatchingTags3() {}
86
public function testGetTags() {}
88
public function testSaveCorrectCall()
90
$this->_instance->setDirectives(array('logging' => false));
91
parent::testSaveCorrectCall();
92
$this->_instance->setDirectives(array('logging' => true));
95
public function testSaveWithNullLifeTime()
97
$this->_instance->setDirectives(array('logging' => false));
98
parent::testSaveWithNullLifeTime();
99
$this->_instance->setDirectives(array('logging' => true));
102
public function testSaveWithSpecificLifeTime()
105
$this->_instance->setDirectives(array('logging' => false));
106
parent::testSaveWithSpecificLifeTime();
107
$this->_instance->setDirectives(array('logging' => true));
110
public function testGetMetadatas($notag = true)
112
parent::testGetMetadatas($notag);