diff options
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 4 | ||||
-rw-r--r-- | tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index e9c12c49..8fd49778 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | |||
@@ -13,7 +13,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
13 | { | 13 | { |
14 | const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; | 14 | const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; |
15 | public $downloadImagesEnabled = false; | 15 | public $downloadImagesEnabled = false; |
16 | public $url = 'https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html'; | 16 | public $url = 'https://www.lemonde.fr/pixels/article/2019/06/18/ce-qu-il-faut-savoir-sur-le-libra-la-cryptomonnaie-de-facebook_5477887_4408996.html'; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * @after | 19 | * @after |
@@ -164,7 +164,7 @@ class EntryControllerTest extends WallabagCoreTestCase | |||
164 | 164 | ||
165 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | 165 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); |
166 | $this->assertSame($this->url, $content->getUrl()); | 166 | $this->assertSame($this->url, $content->getUrl()); |
167 | $this->assertContains('Google', $content->getTitle()); | 167 | $this->assertContains('la cryptomonnaie de Facebook', $content->getTitle()); |
168 | $this->assertSame('fr', $content->getLanguage()); | 168 | $this->assertSame('fr', $content->getLanguage()); |
169 | $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); | 169 | $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); |
170 | $client->getContainer()->get('craue_config')->set('store_article_headers', 0); | 170 | $client->getContainer()->get('craue_config')->set('store_article_headers', 0); |
diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index 1713c10c..4f93a92c 100644 --- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php | |||
@@ -3,6 +3,8 @@ | |||
3 | namespace Tests\Wallabag\UserBundle\Mailer; | 3 | namespace Tests\Wallabag\UserBundle\Mailer; |
4 | 4 | ||
5 | use PHPUnit\Framework\TestCase; | 5 | use PHPUnit\Framework\TestCase; |
6 | use Twig\Environment; | ||
7 | use Twig\Loader\ArrayLoader; | ||
6 | use Wallabag\UserBundle\Entity\User; | 8 | use Wallabag\UserBundle\Entity\User; |
7 | use Wallabag\UserBundle\Mailer\AuthCodeMailer; | 9 | use Wallabag\UserBundle\Mailer\AuthCodeMailer; |
8 | 10 | ||
@@ -27,7 +29,7 @@ class AuthCodeMailerTest extends TestCase | |||
27 | {% block body_text %}text body {{ support_url }}{% endblock %} | 29 | {% block body_text %}text body {{ support_url }}{% endblock %} |
28 | TWIG; | 30 | TWIG; |
29 | 31 | ||
30 | $this->twig = new \Twig_Environment(new \Twig_Loader_Array(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate])); | 32 | $this->twig = new Environment(new ArrayLoader(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate])); |
31 | } | 33 | } |
32 | 34 | ||
33 | public function testSendEmail() | 35 | public function testSendEmail() |