コード例 #1
0
 public function testRemoveMessage()
 {
     $mail = new Zend_Mail_Storage_Writable_Maildir($this->_params);
     $mail->setQuota(array('size' => 3000, 'count' => 5, 'X' => 0));
     $this->assertTrue($mail->checkQuota(false, true));
     $mail->removeMessage(1);
     $this->assertFalse($mail->checkQuota());
 }
コード例 #2
0
    public function testRemoveRemovedFile()
    {
        $mail = new Zend_Mail_Storage_Writable_Maildir($this->_params);
        unlink($this->_params['dirname'] . 'cur/1000000000.P1.example.org:2,S');

        try {
            $mail->removeMessage(1);
        } catch (Exception $e) {
            return; // ok
        }

        $this->fail('should not be able to remove message which is already removed in fs');
    }