/** * @depends testConnect * @author Lionel Lecaque, lionel@taotesting.com * @param common_persistence_KeyValuePersistence $persistence */ public function testExists($persistence) { $this->assertFalse($persistence->exists('fakeKeyName')); }
/** * test whenever an entry associated to the serial exists * * @access public * @author Jerome Bogaerts, <*****@*****.**> * @param string serial * @return boolean */ public function has($serial) { return $this->persistence->exists($serial); }
/** * Whenever or not a state for this service call exists * * @param string $userId * @param string $callId * @return boolean */ public function has($userId, $callId) { $key = $this->getSerial($userId, $callId); return $this->persistence->exists($key); }
/** * @depends testConnect * @author Lionel Lecaque, lionel@taotesting.com * @param common_persistence_KeyValuePersistence $persistence */ public function testPurge($persistence) { $this->assertTrue($persistence->set('fakeKeyName', 'value')); $this->assertTrue($persistence->set('fakeKeyName2', 'value')); $this->assertTrue($persistence->exists('fakeKeyName')); $this->assertTrue($persistence->exists('fakeKeyName2')); $this->assertTrue($persistence->purge()); $this->assertFalse($this->root->hasChildren()); }