assertTrue(false !== stripos($this->getMail()->getSubject(), 'ftp://example.com')); } public function testThatALgicExceptionIsThrownIfNoServerSet() { $mail = MailSuccessFTPSender::create( $this->getApp(), $this->getReceiverMock(), $this->getEmitterMock(), $this->getMessage() ); try { $mail->getSubject(); $this->fail('Should have raised an exception'); }catch(LogicException $e) { } } public function getMail() { $mail = MailSuccessFTPSender::create( $this->getApp(), $this->getReceiverMock(), $this->getEmitterMock(), $this->getMessage() ); $mail->setServer('ftp://example.com'); return $mail; } }