public function test_SQLCache_Insert(){ $c = new SQLCache(); $result = "this is a sample result"; $o_result = "other result"; $t_result = "third result"; $sql = "SELECT * FROM avalanche_buddy WHERE 1"; $other = "SELECT * FROM avalanche_buddy WHERE billy = 'yourmom'"; $third = "SELECT * FROM avalanche_third WHERE 1"; $insert = "INSERT INTO avalanche_buddy (`asf`) VALUES ('asdf')"; $this->assertEqual(SQLCache::getTableName($sql), "avalanche_buddy", "the table is correct"); $this->assertEqual(SQLCache::getTableName($insert), "avalanche_buddy", "the table is correct"); $c->put($sql, $result); $c->put($other, $o_result); $c->put($third, $t_result); $c->clear($insert); $this->assertEqual($c->get($sql), false, "the result is correct"); $this->assertEqual($c->get($other), false, "the result is correct"); $this->assertEqual($c->get($third), $t_result, "the result is correct"); }