]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix #1643: fix the way to load the HTML template in 2factor auth 1645/head
authorNicolas Lœuillet <nicolas.loeuillet@smile.fr>
Thu, 4 Feb 2016 16:29:14 +0000 (17:29 +0100)
committerNicolas Lœuillet <nicolas.loeuillet@smile.fr>
Thu, 4 Feb 2016 16:29:14 +0000 (17:29 +0100)
src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php
src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php

index 354aedbac614b39afed240f8174897683f66cfdc..fd698b3e491a389b71b63f28a00cde559e9d5e1e 100644 (file)
@@ -6,7 +6,7 @@ use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
 
 /**
  * The controller `SettingsController` does not exist.
- * This test cover security against the internal settings page managed by CraueConfigBundle
+ * This test cover security against the internal settings page managed by CraueConfigBundle.
  */
 class SettingsControllerTest extends WallabagCoreTestCase
 {
index 98017f43a62fda6565cf59f08172195b862c489a..d8403491f6d1b0a81d5d1a623b4208a080b794ed 100644 (file)
@@ -48,7 +48,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
     private $supportUrl;
 
     /**
-     * Url for the wallabag instance (only used for image in the HTML email template)
+     * Url for the wallabag instance (only used for image in the HTML email template).
      *
      * @var string
      */
@@ -80,7 +80,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
      */
     public function sendAuthCode(TwoFactorInterface $user)
     {
-        $template = $this->twig->loadTemplate('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig');
+        $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig');
 
         $subject = $template->renderBlock('subject', array());
         $bodyHtml = $template->renderBlock('body_html', [
index 562a1ed2b7e7253a4ee89b0dbb5f37b0c49a9839..b95e195e6cafb4853996aab84ea9f7af347d9129 100644 (file)
@@ -43,7 +43,7 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase
 {% block body_text %}text body {{ support_url }}{% endblock %}
 TWIG;
 
-        $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig' => $twigTemplate)));
+        $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate)));
 
         $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config')
             ->disableOriginalConstructor()