public function testIdWithSingleQuotesCanBeInsertedIntoCacheTable()
 {
     $focus = new InboundEmail();
     $focus->id = create_guid();
     $focus->setCacheTimestamp("John's House");
     $r = $focus->db->getOne('select id from inbound_email_cache_ts where id = \'' . $focus->db->quote("{$focus->id}_John's House") . '\'');
     $this->assertTrue($r !== false, "Could not find id \"{$focus->id}_John's House\" in inbound_email_cache_ts");
     $focus->db->query('delete from inbound_email_cache_ts where id = \'' . $focus->db->quote("{$focus->id}_John's House") . '\'');
 }
 public function testsetAndgetCacheTimestamp()
 {
     $inboundEmail = new InboundEmail();
     $inboundEmail->id = 1;
     //test setCacheTimestamp method
     $inboundEmail->setCacheTimestamp('INBOX');
     //test getCacheTimestamp method
     $result = $inboundEmail->getCacheTimestamp('INBOX');
     $this->assertGreaterThan(0, strlen($result));
 }