コード例 #1
0
ファイル: ImapTest.php プロジェクト: jorgenils/zend-framework
 public function testCount()
 {
     $mail = new Zend_Mail_Imap($this->_params);
     $count = $mail->countMessages();
     $this->assertEquals(5, $count);
 }
コード例 #2
0
ファイル: ImapTest.php プロジェクト: jorgenils/zend-framework
 public function testTooLateCount()
 {
     $mail = new Zend_Mail_Imap($this->_params);
     $mail->close();
     // after closing we can't count messages
     try {
         $mail->countMessages();
     } catch (Exception $e) {
         return;
         // test ok
     }
     $this->fail('no exception raised while counting messages on closed connection');
 }
コード例 #3
0
ファイル: ImapTest.php プロジェクト: jorgenils/zend-framework
 public function testCountFolder()
 {
     $mail = new Zend_Mail_Imap($this->_params);
     $mail->selectFolder('subfolder/test');
     $count = $mail->countMessages();
     $this->assertEquals(1, $count);
 }