diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-04 17:45:26 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-02-04 17:45:26 +0100 |
commit | eb3e3969a2d09767a1eb3042b74ce1f8736e3b4d (patch) | |
tree | ebd9bf7575776b56b3161f31ee035b44a6bbb928 | |
parent | e008c037f53324b931f027483f9f1053171109c5 (diff) | |
parent | 855a4c680f4cb12f64999db2ff58cfb0bdc0614d (diff) | |
download | wallabag-eb3e3969a2d09767a1eb3042b74ce1f8736e3b4d.tar.gz wallabag-eb3e3969a2d09767a1eb3042b74ce1f8736e3b4d.tar.zst wallabag-eb3e3969a2d09767a1eb3042b74ce1f8736e3b4d.zip |
Merge pull request #1645 from wallabag/v2-fix-loadtemplate-sendemail
Fix #1643: fix the way to load the HTML template in 2factor auth
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php index 354aedba..fd698b3e 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/SettingsControllerTest.php | |||
@@ -6,7 +6,7 @@ use Wallabag\CoreBundle\Tests\WallabagCoreTestCase; | |||
6 | 6 | ||
7 | /** | 7 | /** |
8 | * The controller `SettingsController` does not exist. | 8 | * The controller `SettingsController` does not exist. |
9 | * This test cover security against the internal settings page managed by CraueConfigBundle | 9 | * This test cover security against the internal settings page managed by CraueConfigBundle. |
10 | */ | 10 | */ |
11 | class SettingsControllerTest extends WallabagCoreTestCase | 11 | class SettingsControllerTest extends WallabagCoreTestCase |
12 | { | 12 | { |
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index 98017f43..d8403491 100644 --- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php | |||
@@ -48,7 +48,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface | |||
48 | private $supportUrl; | 48 | private $supportUrl; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Url for the wallabag instance (only used for image in the HTML email template) | 51 | * Url for the wallabag instance (only used for image in the HTML email template). |
52 | * | 52 | * |
53 | * @var string | 53 | * @var string |
54 | */ | 54 | */ |
@@ -80,7 +80,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface | |||
80 | */ | 80 | */ |
81 | public function sendAuthCode(TwoFactorInterface $user) | 81 | public function sendAuthCode(TwoFactorInterface $user) |
82 | { | 82 | { |
83 | $template = $this->twig->loadTemplate('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig'); | 83 | $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig'); |
84 | 84 | ||
85 | $subject = $template->renderBlock('subject', array()); | 85 | $subject = $template->renderBlock('subject', array()); |
86 | $bodyHtml = $template->renderBlock('body_html', [ | 86 | $bodyHtml = $template->renderBlock('body_html', [ |
diff --git a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php index 562a1ed2..b95e195e 100644 --- a/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php +++ b/src/Wallabag/UserBundle/Tests/Mailer/AuthCodeMailerTest.php | |||
@@ -43,7 +43,7 @@ class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase | |||
43 | {% block body_text %}text body {{ support_url }}{% endblock %} | 43 | {% block body_text %}text body {{ support_url }}{% endblock %} |
44 | TWIG; | 44 | TWIG; |
45 | 45 | ||
46 | $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('@WallabagUserBundle/Resources/views/TwoFactor/email_auth_code.html.twig' => $twigTemplate))); | 46 | $this->twig = new \Twig_Environment(new \Twig_Loader_Array(array('WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate))); |
47 | 47 | ||
48 | $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config') | 48 | $this->config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config') |
49 | ->disableOriginalConstructor() | 49 | ->disableOriginalConstructor() |