Ejemplo n.º 1
0
 public function testhandleMailboxType()
 {
     //unset and reconnect Db to resolve mysqli fetch exeception
     global $db;
     unset($db->database);
     $db->checkConnection();
     $inboundEmail = new InboundEmail();
     $email = new Email();
     $email->name = 'test';
     $inboundEmail->mailbox_type = 'support';
     //execute the method and test if it works and does not throws an exception.
     try {
         $inboundEmail->handleMailboxType($email, $header);
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }