public function testReadAfterClose() { $protocol = new Protocol\Pop3($this->_params['host']); $protocol->logout(); $this->setExpectedException('Zend\\Mail\\Storage\\Exception\\InvalidArgumentException'); $protocol->readResponse(); }
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'); }
/** * 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(); }