public function testBasicApi() { // test de-coupled instance $cache = new \ElggVolatileMetadataCache(); $cache->setIgnoreAccess(false); $guid = 1; $this->assertFalse($cache->isKnown($guid, $this->name)); $cache->markEmpty($guid, $this->name); $this->assertTrue($cache->isKnown($guid, $this->name)); $this->assertNull($cache->load($guid, $this->name)); $cache->markUnknown($guid, $this->name); $this->assertFalse($cache->isKnown($guid, $this->name)); $cache->save($guid, $this->name, $this->value); $this->assertIdentical($cache->load($guid, $this->name), $this->value); $cache->save($guid, $this->name, 1, true); $this->assertIdentical($cache->load($guid, $this->name), array($this->value, 1)); $cache->clear($guid); $this->assertFalse($cache->isKnown($guid, $this->name)); }