X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FImportBundle%2FController%2FWallabagV1ControllerTest.php;h=4ca6e623e02251a8076ec00f730697178a0fc541;hb=bad7df8c0048285e7a6bd539e5e501ce6675d663;hp=0c7f97ed6a87ec67dfa422ca54f8e6e456529202;hpb=7a8ed3cee1003aae56400e18509980e2695ea622;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index 0c7f97ed..4ca6e623 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php @@ -116,20 +116,18 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase $this->getLoggedInUserId() ); - $tag = $client->getContainer() - ->get('doctrine.orm.entity_manager') - ->getRepository('WallabagCoreBundle:Tag') - ->findOneByLabel('Framabag'); - - $this->assertTrue($content->getTags()->contains($tag)); - $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); $this->assertContains('flashes.import.notice.summary', $body[0]); $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is ok'); $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is ok'); $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.framablog.org is ok'); - $this->assertEquals(2, count($content->getTags())); + + $tags = $content->getTags(); + $this->assertContains('foot', $tags, 'It includes the "foot" tag'); + $this->assertContains('Framabag', $tags, 'It includes the "Framabag" tag'); + $this->assertEquals(2, count($tags)); + $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); }