From 4204a06b7726597dc84fe34b39c53f1534a86140 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 11 Mar 2016 14:48:46 +0100 Subject: Add flashes messages --- src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php | 2 +- .../ImportBundle/Tests/Controller/WallabagV1ControllerTest.php | 6 +++--- .../ImportBundle/Tests/Controller/WallabagV2ControllerTest.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Wallabag/ImportBundle/Tests') diff --git a/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php index c2acd68c..174641fd 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php +++ b/src/Wallabag/ImportBundle/Tests/Controller/PocketControllerTest.php @@ -37,6 +37,6 @@ class PocketControllerTest extends WallabagCoreTestCase $this->assertEquals(302, $client->getResponse()->getStatusCode()); $this->assertContains('import/pocket', $client->getResponse()->headers->get('location')); - $this->assertEquals('Import failed, please try again.', $client->getContainer()->get('session')->getFlashBag()->peek('notice')[0]); + $this->assertEquals('flashes.import.notice.failed', $client->getContainer()->get('session')->getFlashBag()->peek('notice')[0]); } } diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php index 6c876b3b..8d353a71 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php +++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV1ControllerTest.php @@ -55,7 +55,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $this->assertTrue($content->getTags()->contains($tag)); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); - $this->assertContains('Import summary', $body[0]); + $this->assertContains('flashes.import.notice.summary', $body[0]); } public function testImportWallabagWithFileAndMarkAllAsRead() @@ -100,7 +100,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $this->assertTrue($content2->isArchived()); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); - $this->assertContains('Import summary', $body[0]); + $this->assertContains('flashes.import.notice.summary', $body[0]); } public function testImportWallabagWithEmptyFile() @@ -124,6 +124,6 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $crawler = $client->followRedirect(); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); - $this->assertContains('Import failed, please try again', $body[0]); + $this->assertContains('flashes.import.notice.failed', $body[0]); } } diff --git a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php index 58baa836..bcbd6305 100644 --- a/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php +++ b/src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php @@ -40,7 +40,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase $crawler = $client->followRedirect(); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); - $this->assertContains('Import summary', $body[0]); + $this->assertContains('flashes.import.notice.summary', $body[0]); $content = $client->getContainer() ->get('doctrine.orm.entity_manager') @@ -88,6 +88,6 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase $crawler = $client->followRedirect(); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); - $this->assertContains('Import failed, please try again', $body[0]); + $this->assertContains('flashes.import.notice.failed', $body[0]); } } -- cgit v1.2.3