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(); }
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'); }
/** * {@inheritdoc} */ public function close() { if ($this->ignoreCloseCommand) { return; } parent::close(); }