]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php
Fix tests
[github/wallabag/wallabag.git] / src / Wallabag / UserBundle / Tests / Mailer / AuthCodeMailerTest.php
index e3f43a7e76caf1573dc331cc5724dee3c3608535..562a1ed2b7e7253a4ee89b0dbb5f37b0c49a9839 100644 (file)
@@ -26,6 +26,7 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase
     protected $mailer;
     protected $spool;
     protected $twig;
+    protected $config;
 
     protected function setUp()
     {
@@ -43,6 +44,14 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase
 TWIG;
 
         $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('@WallabagUserBundle/Resources/views/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()
@@ -58,8 +67,7 @@ TWIG;
             $this->twig,
             'nobody@test.io',
             'wallabag test',
-            'http://0.0.0.0/support',
-            'http://0.0.0.0'
+            $this->config
         );
 
         $authCodeMailer->sendAuthCode($user);