public function testFailedRemove() { $mail = new Storage\Mbox(array('filename' => $this->_mboxFile)); $this->setExpectedException('Zend\\Mail\\Storage\\Exception\\RuntimeException'); $mail->removeMessage(1); }
public function testFailedRemove() { $mail = new Storage\Mbox(array('filename' => $this->_mboxFile)); try { $mail->removeMessage(1); } catch (\Exception $e) { return; // test ok } $this->fail('no exception raised while deleting message (mbox is read-only)'); }