]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
Enable PHPStan
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / WallabagV1ControllerTest.php
index 25625c35e0eda6bc8f429c0736fa9d2a64156142..1f57939d997d9883a10c0693a108906a0bab1fd4 100644 (file)
@@ -119,14 +119,15 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
         $this->assertContains('flashes.import.notice.summary', $body[0]);
 
+        $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
         $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is empty');
         $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is empty');
         $this->assertEmpty($content->getLanguage(), 'Language for http://www.framablog.org is empty');
 
         $tags = $content->getTags();
         $this->assertContains('foot', $tags, 'It includes the "foot" tag');
-        $this->assertContains('Framabag', $tags, 'It includes the "Framabag" tag');
-        $this->assertSame(2, count($tags));
+        $this->assertContains('framabag', $tags, 'It includes the "framabag" tag');
+        $this->assertCount(2, $tags);
 
         $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
     }
@@ -160,6 +161,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
                 $this->getLoggedInUserId()
             );
 
+        $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content1);
         $this->assertTrue($content1->isArchived());
 
         $content2 = $client->getContainer()
@@ -170,6 +172,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
                 $this->getLoggedInUserId()
             );
 
+        $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content2);
         $this->assertTrue($content2->isArchived());
 
         $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));