aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php10
-rw-r--r--tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php4
-rw-r--r--tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php2
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php4
-rw-r--r--tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json4
8 files changed, 15 insertions, 15 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php
index ddb7a65a..cd3e41e9 100644
--- a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php
@@ -121,7 +121,7 @@ class ChromeControllerTest extends WallabagCoreTestCase
121 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); 121 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
122 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.usinenouvelle.com is ok'); 122 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.usinenouvelle.com is ok');
123 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.usinenouvelle.com is ok'); 123 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.usinenouvelle.com is ok');
124 $this->assertSame(1, count($content->getTags())); 124 $this->assertSame(1, \count($content->getTags()));
125 125
126 $createdAt = $content->getCreatedAt(); 126 $createdAt = $content->getCreatedAt();
127 $this->assertSame('2011', $createdAt->format('Y')); 127 $this->assertSame('2011', $createdAt->format('Y'));
diff --git a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php
index dc9d9a8f..dc5ed6d0 100644
--- a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php
@@ -122,20 +122,20 @@ class FirefoxControllerTest extends WallabagCoreTestCase
122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://lexpansion.lexpress.fr is ok'); 122 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://lexpansion.lexpress.fr is ok');
123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok'); 123 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok');
124 $this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.fr is ok'); 124 $this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.fr is ok');
125 $this->assertSame(3, count($content->getTags())); 125 $this->assertSame(3, \count($content->getTags()));
126 126
127 $content = $client->getContainer() 127 $content = $client->getContainer()
128 ->get('doctrine.orm.entity_manager') 128 ->get('doctrine.orm.entity_manager')
129 ->getRepository('WallabagCoreBundle:Entry') 129 ->getRepository('WallabagCoreBundle:Entry')
130 ->findByUrlAndUserId( 130 ->findByUrlAndUserId(
131 'https://stackoverflow.com/questions/15017163/parser-for-exported-bookmarks-html-file-of-google-chrome-and-mozilla-in-java', 131 'https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html',
132 $this->getLoggedInUserId() 132 $this->getLoggedInUserId()
133 ); 133 );
134 134
135 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); 135 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
136 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://stackoverflow.com is ok'); 136 $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.lemonde.fr is ok');
137 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://stackoverflow.com is ok'); 137 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.lemonde.fr is ok');
138 $this->assertEmpty($content->getLanguage(), 'Language for https://stackoverflow.com is ok'); 138 $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.lemonde.fr is ok');
139 139
140 $createdAt = $content->getCreatedAt(); 140 $createdAt = $content->getCreatedAt();
141 $this->assertSame('2013', $createdAt->format('Y')); 141 $this->assertSame('2013', $createdAt->format('Y'));
diff --git a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php
index dacdf488..80bfc3b4 100644
--- a/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/InstapaperControllerTest.php
@@ -122,7 +122,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
122 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok'); 122 $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok');
123 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok'); 123 $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok');
124 $this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag'); 124 $this->assertContains('foot', $content->getTags(), 'It includes the "foot" tag');
125 $this->assertSame(1, count($content->getTags())); 125 $this->assertSame(1, \count($content->getTags()));
126 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 126 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
127 127
128 $content = $client->getContainer() 128 $content = $client->getContainer()
@@ -136,7 +136,7 @@ class InstapaperControllerTest extends WallabagCoreTestCase
136 $this->assertContains('foot', $content->getTags()); 136 $this->assertContains('foot', $content->getTags());
137 $this->assertContains('test_tag', $content->getTags()); 137 $this->assertContains('test_tag', $content->getTags());
138 138
139 $this->assertSame(2, count($content->getTags())); 139 $this->assertSame(2, \count($content->getTags()));
140 } 140 }
141 141
142 public function testImportInstapaperWithFileAndMarkAllAsRead() 142 public function testImportInstapaperWithFileAndMarkAllAsRead()
diff --git a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php
index 1135f32e..80819f45 100644
--- a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php
@@ -127,7 +127,7 @@ class PinboardControllerTest extends WallabagCoreTestCase
127 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 127 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
128 $this->assertContains('varnish', $tags, 'It includes the "varnish" tag'); 128 $this->assertContains('varnish', $tags, 'It includes the "varnish" tag');
129 $this->assertContains('php', $tags, 'It includes the "php" tag'); 129 $this->assertContains('php', $tags, 'It includes the "php" tag');
130 $this->assertSame(3, count($tags)); 130 $this->assertSame(3, \count($tags));
131 131
132 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 132 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
133 $this->assertSame('2016-10-26', $content->getCreatedAt()->format('Y-m-d')); 133 $this->assertSame('2016-10-26', $content->getCreatedAt()->format('Y-m-d'));
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
index 78816ad8..5619659a 100644
--- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
@@ -125,7 +125,7 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
125 125
126 $tags = $content->getTags(); 126 $tags = $content->getTags();
127 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 127 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
128 $this->assertSame(1, count($tags)); 128 $this->assertSame(1, \count($tags));
129 129
130 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 130 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
131 $this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d')); 131 $this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
index e0e309b0..c67941a7 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
@@ -127,7 +127,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
127 $tags = $content->getTags(); 127 $tags = $content->getTags();
128 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 128 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
129 $this->assertContains('framabag', $tags, 'It includes the "framabag" tag'); 129 $this->assertContains('framabag', $tags, 'It includes the "framabag" tag');
130 $this->assertSame(2, count($tags)); 130 $this->assertSame(2, \count($tags));
131 131
132 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 132 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
133 } 133 }
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
index e52b9c85..67490714 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
@@ -128,7 +128,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
128 128
129 $tags = $content->getTags(); 129 $tags = $content->getTags();
130 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 130 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
131 $this->assertSame(1, count($tags)); 131 $this->assertSame(1, \count($tags));
132 132
133 $content = $client->getContainer() 133 $content = $client->getContainer()
134 ->get('doctrine.orm.entity_manager') 134 ->get('doctrine.orm.entity_manager')
@@ -147,7 +147,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
147 $this->assertContains('foot', $tags, 'It includes the "foot" tag'); 147 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
148 $this->assertContains('mediapart', $tags, 'It includes the "mediapart" tag'); 148 $this->assertContains('mediapart', $tags, 'It includes the "mediapart" tag');
149 $this->assertContains('blog', $tags, 'It includes the "blog" tag'); 149 $this->assertContains('blog', $tags, 'It includes the "blog" tag');
150 $this->assertSame(3, count($tags)); 150 $this->assertSame(3, \count($tags));
151 151
152 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 152 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
153 $this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d')); 153 $this->assertSame('2016-09-08', $content->getCreatedAt()->format('Y-m-d'));
diff --git a/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json b/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json
index 406b5697..3d90b489 100644
--- a/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json
+++ b/tests/Wallabag/ImportBundle/fixtures/firefox-bookmarks.json
@@ -39,13 +39,13 @@
39 }, 39 },
40 { 40 {
41 "guid": "E385l9vZ_LVn", 41 "guid": "E385l9vZ_LVn",
42 "title": "Parser for Exported Bookmarks HTML file of Google Chrome and Mozilla in Java", 42 "title": "Le journaliste et cinéaste Claude Lanzmann est mort",
43 "index": 1, 43 "index": 1,
44 "dateAdded": 1388166091544000, 44 "dateAdded": 1388166091544000,
45 "lastModified": 1388166091545000, 45 "lastModified": 1388166091545000,
46 "id": 5, 46 "id": 5,
47 "type": "text/x-moz-place", 47 "type": "text/x-moz-place",
48 "uri": "http://stackoverflow.com/questions/15017163/parser-for-exported-bookmarks-html-file-of-google-chrome-and-mozilla-in-java" 48 "uri": "https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html"
49 } 49 }
50 ] 50 ]
51 }, 51 },