Esempio n. 1
0
 /**
  * Tests working connection.
  */
 public function testAllOk()
 {
     // Skip the test if no IMAP connection is defined
     if (empty($GLOBALS['imap']) || !preg_match('~^([^:]+):([^@]+)@([^:]+):(\\d+)$~', $GLOBALS['imap'], $matches)) {
         $this->markTestSkipped('Imap not set');
     }
     list($user, $password, $host, $port) = array_slice($matches, 1);
     $test = new Imap('Imap', $host, $user, $password, $port, false);
     $result = $test->run();
     $this->assertEquals(\Jyxo\Beholder\Result::SUCCESS, $result->getStatus());
     $this->assertEquals(sprintf('%s@%s:%s', $user, $host, $port), $result->getDescription());
 }