function __construct(Mailbox $mailbox)
 {
     $this->mailbox = $mailbox;
     if (!($this->connection = $this->connect())) {
         throw new Exception('Unable to connect to to mailbox: ' . $this->mailbox->getServer());
     }
 }
Esempio n. 2
0
 /**
  * @test
  */
 public function it_sets_the_server()
 {
     $this->mailbox->setServer('foo');
     $this->assertEquals('foo', $this->mailbox->getServer());
 }