]> 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 4bc982e0ae977c774b8ab259e7b2fa81f1c76e57..1f57939d997d9883a10c0693a108906a0bab1fd4 100644 (file)
@@ -119,6 +119,7 @@ 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');
@@ -126,7 +127,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
         $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->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']));