Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: CommonBackendTest.php
- ===================================================================
- --- CommonBackendTest.php (revision 24811)
- +++ CommonBackendTest.php (working copy)
- @@ -280,6 +280,20 @@
- $this->assertFalse($this->_instance->test('bar3'));
- }
- + public function testCleanModeMatchingAnyTags()
- + {
- + $this->assertTrue($this->_instance->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('tag1')));
- + $this->assertTrue($this->_instance->test('bar') > 999999);
- + $this->assertTrue($this->_instance->test('bar3') > 999999);
- + $this->assertFalse($this->_instance->test('bar2'));
- + }
- +
- + public function testCleanModeMatchingAnyTags2()
- + {
- + $this->assertTrue($this->_instance->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('tag4', 'tag1')));
- + $this->assertFalse($this->_instance->test('bar'));
- + $this->assertFalse($this->_instance->test('bar2'));
- + $this->assertTrue($this->_instance->test('bar3') > 999999);
- + }
- }
- -
- Index: CommonExtendedBackendTest.php
- ===================================================================
- --- CommonExtendedBackendTest.php (revision 24811)
- +++ CommonExtendedBackendTest.php (working copy)
- @@ -173,6 +173,41 @@
- $this->assertTrue(in_array('bar3', $res));
- }
- + public function testGetIdsMatchingAnyTags()
- + {
- + if (!($this->_capabilities['tags'])) {
- + #Â unsupported by this backend
- + return;
- + }
- + $res = $this->_instance->getIdsMatchingAnyTags(array('tag5'));
- + $this->assertTrue(count($res) == 0);
- + }
- +
- + public function testGetIdsMatchingAnyTags2()
- + {
- + if (!($this->_capabilities['tags'])) {
- + #Â unsupported by this backend
- + return;
- + }
- + $res = $this->_instance->getIdsMatchingAnyTags(array('tag3'));
- + $this->assertTrue(count($res) == 3);
- + $this->assertTrue(in_array('bar', $res));
- + $this->assertTrue(in_array('bar2', $res));
- + $this->assertTrue(in_array('bar3', $res));
- + }
- +
- + public function testGetIdsMatchingAnyTags3()
- + {
- + if (!($this->_capabilities['tags'])) {
- + #Â unsupported by this backend
- + return;
- + }
- + $res = $this->_instance->getIdsMatchingAnyTags(array('tag2', 'tag4'));
- + $this->assertTrue(count($res) == 2);
- + $this->assertTrue(in_array('bar', $res));
- + $this->assertTrue(in_array('bar3', $res));
- + }
- +
- public function testGetMetadatas($notag = false)
- {
- $res = $this->_instance->getMetadatas('bar');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement