From 2a58606983bd6091866a9f38149a87c25900decd Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 12:24:35 +0100 Subject: [PATCH] Fix tests --- .../CoreBundle/Tests/Command/InstallCommandTest.php | 1 + .../UserBundle/Tests/Mailer/AuthCodeMailerTest.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index 7d75e2b7..a79d7b90 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php @@ -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()); diff --git a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php index e3f43a7e..562a1ed2 100644 --- a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php +++ b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php @@ -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); -- 2.41.0