Exemplo n.º 1
0
 public function testReadAfterClose()
 {
     $protocol = new Protocol\Pop3($this->_params['host']);
     $protocol->logout();
     $this->setExpectedException('Zend\\Mail\\Storage\\Exception\\InvalidArgumentException');
     $protocol->readResponse();
 }
Exemplo n.º 2
0
 public function testReadAfterClose()
 {
     $protocol = new Protocol\Pop3($this->_params['host']);
     $protocol->logout();
     try {
         $protocol->readResponse();
     } catch (\Exception $e) {
         return;
         // test ok
     }
     $this->fail('no exception while reading from closed socket');
 }
Exemplo n.º 3
0
 /**
  * Close resource for mail lib. If you need to control, when the resource
  * is closed. Otherwise the destructor would call this.
  */
 public function close()
 {
     $this->protocol->logout();
 }