X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FImportBundle%2FController%2FFirefoxControllerTest.php;h=7557ea328b7819f426d102aa379ff2b7761df384;hb=5cc367b83aceea4bc5ac2f18a29cd737a4fce09e;hp=2de0aa09395b06b238ee1a3158c2b12dbfe0df6b;hpb=59201088b4fc13fd361238396f630dabd9bd1990;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php index 2de0aa09..7557ea32 100644 --- a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php @@ -54,6 +54,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase public function testImportFirefoxWithRedisEnabled() { + $this->checkRedis(); $this->logInAs('admin'); $client = $this->getClient(); $client->getContainer()->get('craue_config')->set('import_with_redis', 1); @@ -117,10 +118,10 @@ class FirefoxControllerTest extends WallabagCoreTestCase $this->getLoggedInUserId() ); - $this->assertNotEmpty($content->getMimetype()); - $this->assertNotEmpty($content->getPreviewPicture()); - $this->assertNotEmpty($content->getLanguage()); - $this->assertEquals(0, count($content->getTags())); + $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://lexpansion.lexpress.fr is ok'); + $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok'); + $this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.fr is ok'); + $this->assertEquals(2, count($content->getTags())); $content = $client->getContainer() ->get('doctrine.orm.entity_manager') @@ -130,9 +131,13 @@ class FirefoxControllerTest extends WallabagCoreTestCase $this->getLoggedInUserId() ); - $this->assertNotEmpty($content->getMimetype()); - $this->assertNotEmpty($content->getPreviewPicture()); - $this->assertEmpty($content->getLanguage()); + $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://stackoverflow.com is ok'); + $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://stackoverflow.com is ok'); + $this->assertEmpty($content->getLanguage(), 'Language for http://stackoverflow.com is ok'); + + $createdAt = $content->getCreatedAt(); + $this->assertEquals('2013', $createdAt->format('Y')); + $this->assertEquals('12', $createdAt->format('m')); } public function testImportWallabagWithEmptyFile()