/** * Testing get() * * @return void */ public function testGet() { $this->assertThat( $this->object->get(1, '', time()), $this->equalTo(false) ); }
/** * @testdox Data not within the specified group is removed from the cache store */ public function testCacheClearNotGroup() { $data = 'testData'; $secondId = bin2hex(random_bytes(8)); $secondGroup = 'group2'; $this->assertTrue($this->handler->store($this->id, $this->group, $data), 'Initial Store Failed'); $this->assertTrue($this->handler->store($secondId, $data, $secondGroup), 'Initial Store Failed'); $this->assertTrue($this->handler->clean($this->group, 'notgroup'), 'Removal Failed'); $this->assertSame($this->handler->get($this->id, $this->group), $data, 'Data in the group specified in JCacheStorage::clean() should still exist'); $this->assertFalse($this->handler->get($secondId, $secondGroup), 'Data in the groups not specified in JCacheStorage::clean() should not exist'); }