X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FController%2FExportControllerTest.php;h=6f3308e56f337bd1d02d8cc7a36fca40a844deba;hb=b878be4cc99fd4927c70b59386cf7a57b33bb381;hp=ba9296af1c6300b36ea2cbcfc4cc1df43ddceea4;hpb=f808b01692a835673f328d7221ba8c212caa9b61;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php index ba9296af..6f3308e5 100644 --- a/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ExportControllerTest.php @@ -180,7 +180,7 @@ class ExportControllerTest extends WallabagCoreTestCase $this->assertGreaterThan(1, $csv); // +1 for title line - $this->assertSame(count($contentInDB) + 1, count($csv)); + $this->assertSame(\count($contentInDB) + 1, \count($csv)); $this->assertSame('Title;URL;Content;Tags;"MIME Type";Language;"Creation date"', $csv[0]); $this->assertContains($contentInDB[0]['title'], $csv[1]); $this->assertContains($contentInDB[0]['url'], $csv[1]); @@ -230,8 +230,8 @@ class ExportControllerTest extends WallabagCoreTestCase $this->assertArrayHasKey('created_at', $content[0]); $this->assertArrayHasKey('updated_at', $content[0]); - $this->assertSame($contentInDB->isArchived(), $content[0]['is_archived']); - $this->assertSame($contentInDB->isStarred(), $content[0]['is_starred']); + $this->assertSame((int) $contentInDB->isArchived(), $content[0]['is_archived']); + $this->assertSame((int) $contentInDB->isStarred(), $content[0]['is_starred']); $this->assertSame($contentInDB->getTitle(), $content[0]['title']); $this->assertSame($contentInDB->getUrl(), $content[0]['url']); $this->assertSame([['text' => 'This is my annotation /o/', 'quote' => 'content']], $content[0]['annotations']); @@ -239,7 +239,8 @@ class ExportControllerTest extends WallabagCoreTestCase $this->assertSame($contentInDB->getLanguage(), $content[0]['language']); $this->assertSame($contentInDB->getReadingtime(), $content[0]['reading_time']); $this->assertSame($contentInDB->getDomainname(), $content[0]['domain_name']); - $this->assertSame(['foo bar', 'baz'], $content[0]['tags']); + $this->assertContains('baz', $content[0]['tags']); + $this->assertContains('foo', $content[0]['tags']); } public function testXmlExport() @@ -271,7 +272,7 @@ class ExportControllerTest extends WallabagCoreTestCase $content = new \SimpleXMLElement($client->getResponse()->getContent()); $this->assertGreaterThan(0, $content->count()); - $this->assertSame(count($contentInDB), $content->count()); + $this->assertSame(\count($contentInDB), $content->count()); $this->assertNotEmpty('id', (string) $content->entry[0]->id); $this->assertNotEmpty('title', (string) $content->entry[0]->title); $this->assertNotEmpty('url', (string) $content->entry[0]->url);