From f55bc774bed9ba43fba1c54ac02a605c45ae3e4a Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 15 Oct 2015 17:36:19 +0200 Subject: [PATCH] PHRAS-772 #time 30m fix test --- .../Tests/Phrasea/Notification/DelivererTest.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php b/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php index 6ae92610ba..ae396fae4a 100644 --- a/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php +++ b/tests/Alchemy/Tests/Phrasea/Notification/DelivererTest.php @@ -337,7 +337,20 @@ class DelivererTest extends \PhraseanetTestCase private function getMailerMock() { - return $this->getMockBuilder('\Swift_Mailer')->disableOriginalConstructor()->getMock(); + $mailer = $this->getMockBuilder('\Swift_Mailer') + ->disableOriginalConstructor() + ->getMock(); + + $transport = $this->getMock('Swift_Transport'); + $transport->expects($this->any()) + ->method('isStarted') + ->willReturn(true); + + $mailer->expects($this->any()) + ->method('getTransport') + ->willReturn($transport); + + return $mailer; } private function getEmitterMock()