コード例 #1
0
ファイル: Bug49784Test.php プロジェクト: jgera/sugarcrm_dev
 public function testCaseHandlingOfInboundEmail()
 {
     //lets make sure the file exists
     $this->assertFileExists($this->casesCountFile, 'file to be run from logic hook that keeps track of execution count was not written');
     //create a new inbound email and call process that links to case
     $i = new InboundEmail();
     $i->handleCaseAssignment($this->email);
     //make sure the logic hook only ran once
     $this->assertEquals(1, $GLOBALS['hookRunCount'], 'Logic hook should only have run once during the inbound email processing.');
 }
コード例 #2
0
 public function testhandleCaseAssignment()
 {
     //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';
     $result = $inboundEmail->handleCaseAssignment($email);
     $this->assertEquals(false, $result);
 }