public function testGetIdsMatchingAnyTags4() { $res = $this->_instance->getIdsMatchingAnyTags(array('tag1', 'tag4')); $this->assertEquals(2, count($res)); $this->assertTrue(in_array('bar', $res)); $this->assertTrue(in_array('bar2', $res)); }
public function testCleanModeMatchingAnyTags6() { $tags = array(); for ($i = 0; $i < self::LUA_MAX_C_STACK * 5; $i++) { $tags[] = 'baz' . $i; } $this->_instance->save('foo', 'foo', $tags); $_tags = array(end($tags)); $this->assertEquals(1, count($this->_instance->getIdsMatchingAnyTags($_tags))); $this->_instance->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, $_tags); $this->assertEquals(0, count($this->_instance->getIdsMatchingAnyTags($_tags))); }
/** * This method will return an empty array when constructor failed. * * {@inheritdoc} */ public function getIdsMatchingAnyTags($tags = array()) { $result = array(); if ($this->works) { $result = parent::getIdsMatchingAnyTags($tags); } return $result; }