]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix tests
authorJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 21 Jan 2016 11:24:35 +0000 (12:24 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sun, 31 Jan 2016 13:48:26 +0000 (14:48 +0100)
src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php

index 7d75e2b7b2755ee5878a51644aeb37ef4bc53e87..a79d7b9065409a24b4e0318b774546ef985c1df3 100644 (file)
@@ -81,6 +81,7 @@ class InstallCommandTest extends WallabagCoreTestCase
 
         $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
         $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
+        $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay());
         $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
         $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
 
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);