public function testWrongUniqueId() { $mail = new Zend_Mail_Storage_Imap($this->_params); try { $mail->getNumberByUniqueId('this_is_an_invalid_id'); } catch (Exception $e) { return; // test ok } $this->fail('no exception while getting number for invalid id'); }