X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FImportBundle%2FController%2FPinboardControllerTest.php;h=e2b6e7b6eb1d1f6d14180a7fda4630a394896595;hb=873f6b8e03079d11fab541aa5b0bc6f8fe2d645e;hp=cd7f569b005ac6bf4c4ab39580bb25ecde17e119;hpb=41c2178685a93999a48842ab79b08091c0345c59;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php index cd7f569b..e2b6e7b6 100644 --- a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php @@ -118,10 +118,16 @@ class PinboardControllerTest extends WallabagCoreTestCase $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); $this->assertContains('flashes.import.notice.summary', $body[0]); - $this->assertNotEmpty($content->getMimetype()); - $this->assertNotEmpty($content->getPreviewPicture()); - $this->assertNotEmpty($content->getLanguage()); - $this->assertEquals(2, count($content->getTags())); + $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://ma.ttias.be is ok'); + $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://ma.ttias.be is ok'); + $this->assertNotEmpty($content->getLanguage(), 'Language for https://ma.ttias.be is ok'); + + $tags = $content->getTags(); + $this->assertContains('foot', $tags, 'It includes the "foot" tag'); + $this->assertContains('varnish', $tags, 'It includes the "varnish" tag'); + $this->assertContains('PHP', $tags, 'It includes the "PHP" tag'); + $this->assertEquals(3, count($tags)); + $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); $this->assertEquals('2016-10-26', $content->getCreatedAt()->format('Y-m-d')); }