X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FUserBundle%2FMailer%2FAuthCodeMailerTest.php;h=7381ccf12a2fe429530d038404ea0fe2d74ff31d;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=441d6519f5723537239b9e24f11863418e2abcba;hpb=114c55c0a6eade2ba6c53fe25f61cc58cca91620;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index 441d6519..7381ccf1 100644 --- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php @@ -26,7 +26,6 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase protected $mailer; protected $spool; protected $twig; - protected $config; protected function setUp() { @@ -44,14 +43,6 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase TWIG; $this->twig = new \Twig_Environment(new \Twig_Loader_Array(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate])); - - $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config') - ->disableOriginalConstructor() - ->getMock(); - - $this->config->expects($this->any()) - ->method('get') - ->willReturn('http://0.0.0.0/support'); } public function testSendEmail() @@ -67,7 +58,8 @@ TWIG; $this->twig, 'nobody@test.io', 'wallabag test', - $this->config + 'http://0.0.0.0/support', + 'http://0.0.0.0/' ); $authCodeMailer->sendAuthCode($user); @@ -76,8 +68,8 @@ TWIG; $msg = $this->spool->getMessages()[0]; $this->assertArrayHasKey('test@wallabag.io', $msg->getTo()); - $this->assertEquals(['nobody@test.io' => 'wallabag test'], $msg->getFrom()); - $this->assertEquals('subject', $msg->getSubject()); + $this->assertSame(['nobody@test.io' => 'wallabag test'], $msg->getFrom()); + $this->assertSame('subject', $msg->getSubject()); $this->assertContains('text body http://0.0.0.0/support', $msg->toString()); $this->assertContains('html body 666666', $msg->toString()); }