equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Cache |
16 * @package Zend_Cache |
17 * @subpackage Zend_Cache_Backend |
17 * @subpackage Zend_Cache_Backend |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Test.php 23051 2010-10-07 17:01:21Z mabe $ |
20 * @version $Id: Test.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** |
24 /** |
25 * @see Zend_Cache_Backend_Interface |
25 * @see Zend_Cache_Backend_Interface |
32 require_once 'Zend/Cache/Backend.php'; |
32 require_once 'Zend/Cache/Backend.php'; |
33 |
33 |
34 /** |
34 /** |
35 * @package Zend_Cache |
35 * @package Zend_Cache |
36 * @subpackage Zend_Cache_Backend |
36 * @subpackage Zend_Cache_Backend |
37 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
39 */ |
39 */ |
40 class Zend_Cache_Backend_Test extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface |
40 class Zend_Cache_Backend_Test extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface |
41 { |
41 { |
42 /** |
42 /** |
162 * @return boolean True if no problem |
162 * @return boolean True if no problem |
163 */ |
163 */ |
164 public function save($data, $id, $tags = array(), $specificLifetime = false) |
164 public function save($data, $id, $tags = array(), $specificLifetime = false) |
165 { |
165 { |
166 $this->_addLog('save', array($data, $id, $tags)); |
166 $this->_addLog('save', array($data, $id, $tags)); |
167 if ($id=='false') { |
167 if (substr($id,-5)=='false') { |
168 return false; |
168 return false; |
169 } |
169 } |
170 return true; |
170 return true; |
171 } |
171 } |
172 |
172 |
180 * @return boolean True if no problem |
180 * @return boolean True if no problem |
181 */ |
181 */ |
182 public function remove($id) |
182 public function remove($id) |
183 { |
183 { |
184 $this->_addLog('remove', array($id)); |
184 $this->_addLog('remove', array($id)); |
185 if ($id=='false') { |
185 if (substr($id,-5)=='false') { |
186 return false; |
186 return false; |
187 } |
187 } |
188 return true; |
188 return true; |
189 } |
189 } |
190 |
190 |