assertTrue($cache->store($id, $data), "$id store"); $this->assertEquals($cache->getSize($id), $this->countBytes($data), "$id getSize"); $this->assertTrue($cache->isValid($id, $_SERVER['REQUEST_TIME'] - 10), "$id isValid"); ob_start(); $cache->display($id); $displayed = ob_get_contents(); ob_end_clean(); $this->assertSame($data, $displayed, "$id display"); $this->assertEquals($data, $cache->fetch($id), "$id fetch"); } }