]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php
an other test for non empty fields
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Tests / Controller / WallabagV2ControllerTest.php
index 49b4703ed321947d7f47b062e4bc1db055b5d9d8..617c0517797702d88728f53e422ebff5eedbc994 100644 (file)
@@ -50,9 +50,21 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
                 $this->getLoggedInUserId()
             );
 
-        $this->assertEquals('', $content->getMimetype());
-        $this->assertEquals('', $content->getPreviewPicture());
-        $this->assertEquals('', $content->getLanguage());
+        $this->assertEmpty($content->getMimetype());
+        $this->assertEmpty($content->getPreviewPicture());
+        $this->assertEmpty($content->getLanguage());
+
+        $content = $client->getContainer()
+            ->get('doctrine.orm.entity_manager')
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findByUrlAndUserId(
+                'https://www.mediapart.fr/',
+                $this->getLoggedInUserId()
+            );
+
+        $this->assertNotEmpty($content->getMimetype());
+        $this->assertNotEmpty($content->getPreviewPicture());
+        $this->assertNotEmpty($content->getLanguage());
     }
 
     public function testImportWallabagWithEmptyFile()