public function testhandleLinking() { //unset and reconnect Db to resolve mysqli fetch exeception global $db; unset($db->database); $db->checkConnection(); $inboundEmail = new InboundEmail(); $email = new Email(); $email->from_addr = '*****@*****.**'; $result = $inboundEmail->handleLinking($email); $this->assertEquals($email->from_addr, $result); }