Пример #1
0
 public function testTooLateCount()
 {
     $mail = new Storage\Imap($this->_params);
     $mail->close();
     // after closing we can't count messages
     $this->setExpectedException('Zend\\Mail\\Storage\\Exception\\InvalidArgumentException');
     $mail->countMessages();
 }
Пример #2
0
 public function testTooLateCount()
 {
     $mail = new Storage\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
 /**
  * {@inheritdoc}
  */
 public function close()
 {
     if ($this->ignoreCloseCommand) {
         return;
     }
     parent::close();
 }