diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-11 09:55:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 09:55:03 +0200 |
commit | d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862 (patch) | |
tree | 3f7ea5ce149b98d01a32f45c2d5be43fbf8ea21c /tests/Wallabag/ImportBundle/Controller | |
parent | 21bdbb2d5e8ef1a93a51bc6d55e041f95820b4ba (diff) | |
parent | f645d371ce55e9c2a45712df34244318742b0d74 (diff) | |
download | wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.tar.gz wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.tar.zst wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.zip |
Merge pull request #3376 from wallabag/symfony-3.3
Symfony 3.3
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller')
6 files changed, 18 insertions, 3 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php index 3873ccf4..ddb7a65a 100644 --- a/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ChromeControllerTest.php | |||
@@ -114,10 +114,11 @@ class ChromeControllerTest extends WallabagCoreTestCase | |||
114 | ->get('doctrine.orm.entity_manager') | 114 | ->get('doctrine.orm.entity_manager') |
115 | ->getRepository('WallabagCoreBundle:Entry') | 115 | ->getRepository('WallabagCoreBundle:Entry') |
116 | ->findByUrlAndUserId( | 116 | ->findByUrlAndUserId( |
117 | 'http://www.usinenouvelle.com/article/la-multiplication-des-chefs-de-projet-est-une-catastrophe-manageriale-majeure-affirme-le-sociologue-francois-dupuy.N307730', | 117 | 'https://www.usinenouvelle.com/article/la-multiplication-des-chefs-de-projet-est-une-catastrophe-manageriale-majeure-affirme-le-sociologue-francois-dupuy.N307730', |
118 | $this->getLoggedInUserId() | 118 | $this->getLoggedInUserId() |
119 | ); | 119 | ); |
120 | 120 | ||
121 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
121 | $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'); |
122 | $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'); |
123 | $this->assertSame(1, count($content->getTags())); | 124 | $this->assertSame(1, count($content->getTags())); |
diff --git a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php index 5e1260b1..933fffa2 100644 --- a/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/FirefoxControllerTest.php | |||
@@ -118,6 +118,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase | |||
118 | $this->getLoggedInUserId() | 118 | $this->getLoggedInUserId() |
119 | ); | 119 | ); |
120 | 120 | ||
121 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
121 | $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'); |
122 | $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'); |
123 | $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'); |
@@ -131,6 +132,7 @@ class FirefoxControllerTest extends WallabagCoreTestCase | |||
131 | $this->getLoggedInUserId() | 132 | $this->getLoggedInUserId() |
132 | ); | 133 | ); |
133 | 134 | ||
135 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
134 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://stackoverflow.com is ok'); | 136 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://stackoverflow.com is ok'); |
135 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://stackoverflow.com is ok'); | 137 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://stackoverflow.com is ok'); |
136 | $this->assertEmpty($content->getLanguage(), 'Language for https://stackoverflow.com is ok'); | 138 | $this->assertEmpty($content->getLanguage(), 'Language for https://stackoverflow.com is ok'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php index 9bb59766..1135f32e 100644 --- a/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/PinboardControllerTest.php | |||
@@ -118,6 +118,7 @@ class PinboardControllerTest extends WallabagCoreTestCase | |||
118 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 118 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
119 | $this->assertContains('flashes.import.notice.summary', $body[0]); | 119 | $this->assertContains('flashes.import.notice.summary', $body[0]); |
120 | 120 | ||
121 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
121 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://ma.ttias.be is ok'); | 122 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://ma.ttias.be is ok'); |
122 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://ma.ttias.be is ok'); | 123 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://ma.ttias.be is ok'); |
123 | $this->assertNotEmpty($content->getLanguage(), 'Language for https://ma.ttias.be is ok'); | 124 | $this->assertNotEmpty($content->getLanguage(), 'Language for https://ma.ttias.be is ok'); |
@@ -161,6 +162,7 @@ class PinboardControllerTest extends WallabagCoreTestCase | |||
161 | $this->getLoggedInUserId() | 162 | $this->getLoggedInUserId() |
162 | ); | 163 | ); |
163 | 164 | ||
165 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content1); | ||
164 | $this->assertTrue($content1->isArchived()); | 166 | $this->assertTrue($content1->isArchived()); |
165 | 167 | ||
166 | $content2 = $client->getContainer() | 168 | $content2 = $client->getContainer() |
@@ -171,6 +173,7 @@ class PinboardControllerTest extends WallabagCoreTestCase | |||
171 | $this->getLoggedInUserId() | 173 | $this->getLoggedInUserId() |
172 | ); | 174 | ); |
173 | 175 | ||
176 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content2); | ||
174 | $this->assertTrue($content2->isArchived()); | 177 | $this->assertTrue($content2->isArchived()); |
175 | 178 | ||
176 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 179 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
diff --git a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php index e1915150..fcb9dfab 100644 --- a/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php | |||
@@ -111,13 +111,14 @@ class ReadabilityControllerTest extends WallabagCoreTestCase | |||
111 | ->get('doctrine.orm.entity_manager') | 111 | ->get('doctrine.orm.entity_manager') |
112 | ->getRepository('WallabagCoreBundle:Entry') | 112 | ->getRepository('WallabagCoreBundle:Entry') |
113 | ->findByUrlAndUserId( | 113 | ->findByUrlAndUserId( |
114 | 'http://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/', | 114 | 'https://www.zataz.com/90-des-dossiers-medicaux-des-coreens-du-sud-vendus-a-des-entreprises-privees/', |
115 | $this->getLoggedInUserId() | 115 | $this->getLoggedInUserId() |
116 | ); | 116 | ); |
117 | 117 | ||
118 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 118 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
119 | $this->assertContains('flashes.import.notice.summary', $body[0]); | 119 | $this->assertContains('flashes.import.notice.summary', $body[0]); |
120 | 120 | ||
121 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
121 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok'); | 122 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.zataz.com is ok'); |
122 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok'); | 123 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.zataz.com is ok'); |
123 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.zataz.com is ok'); | 124 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.zataz.com is ok'); |
@@ -159,16 +160,18 @@ class ReadabilityControllerTest extends WallabagCoreTestCase | |||
159 | $this->getLoggedInUserId() | 160 | $this->getLoggedInUserId() |
160 | ); | 161 | ); |
161 | 162 | ||
163 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content1); | ||
162 | $this->assertTrue($content1->isArchived()); | 164 | $this->assertTrue($content1->isArchived()); |
163 | 165 | ||
164 | $content2 = $client->getContainer() | 166 | $content2 = $client->getContainer() |
165 | ->get('doctrine.orm.entity_manager') | 167 | ->get('doctrine.orm.entity_manager') |
166 | ->getRepository('WallabagCoreBundle:Entry') | 168 | ->getRepository('WallabagCoreBundle:Entry') |
167 | ->findByUrlAndUserId( | 169 | ->findByUrlAndUserId( |
168 | 'https://facebook.github.io/graphql/', | 170 | 'https://facebook.github.io/graphql/October2016/', |
169 | $this->getLoggedInUserId() | 171 | $this->getLoggedInUserId() |
170 | ); | 172 | ); |
171 | 173 | ||
174 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content2); | ||
172 | $this->assertTrue($content2->isArchived()); | 175 | $this->assertTrue($content2->isArchived()); |
173 | 176 | ||
174 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 177 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index 4bc982e0..e0e309b0 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | |||
@@ -119,6 +119,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
119 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 119 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
120 | $this->assertContains('flashes.import.notice.summary', $body[0]); | 120 | $this->assertContains('flashes.import.notice.summary', $body[0]); |
121 | 121 | ||
122 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
122 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is empty'); | 123 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is empty'); |
123 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is empty'); | 124 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is empty'); |
124 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.framablog.org is empty'); | 125 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.framablog.org is empty'); |
@@ -160,6 +161,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
160 | $this->getLoggedInUserId() | 161 | $this->getLoggedInUserId() |
161 | ); | 162 | ); |
162 | 163 | ||
164 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content1); | ||
163 | $this->assertTrue($content1->isArchived()); | 165 | $this->assertTrue($content1->isArchived()); |
164 | 166 | ||
165 | $content2 = $client->getContainer() | 167 | $content2 = $client->getContainer() |
@@ -170,6 +172,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
170 | $this->getLoggedInUserId() | 172 | $this->getLoggedInUserId() |
171 | ); | 173 | ); |
172 | 174 | ||
175 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content2); | ||
173 | $this->assertTrue($content2->isArchived()); | 176 | $this->assertTrue($content2->isArchived()); |
174 | 177 | ||
175 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 178 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index a94adcaf..e52b9c85 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |||
@@ -119,6 +119,8 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
119 | $this->getLoggedInUserId() | 119 | $this->getLoggedInUserId() |
120 | ); | 120 | ); |
121 | 121 | ||
122 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
123 | |||
122 | // empty because it wasn't re-imported | 124 | // empty because it wasn't re-imported |
123 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is empty'); | 125 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is empty'); |
124 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is empty'); | 126 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is empty'); |
@@ -136,6 +138,7 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
136 | $this->getLoggedInUserId() | 138 | $this->getLoggedInUserId() |
137 | ); | 139 | ); |
138 | 140 | ||
141 | $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); | ||
139 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.mediapart.fr is ok'); | 142 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.mediapart.fr is ok'); |
140 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.mediapart.fr is ok'); | 143 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.mediapart.fr is ok'); |
141 | $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.mediapart.fr is ok'); | 144 | $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.mediapart.fr is ok'); |