diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-05-31 17:26:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 17:26:05 +0200 |
commit | ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480 (patch) | |
tree | 1f4387becf57b376759e72c6a8de28693776de6d /tests/Wallabag/ImportBundle/Controller | |
parent | 4423b88c5b2c2d530b0a83a822f521a61ca4d4b8 (diff) | |
parent | 4368a27152021fd5a5ac09109eb0260d69c54c3c (diff) | |
download | wallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.tar.gz wallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.tar.zst wallabag-ec8e7ffad48c9920b4b63b8e278c8bec1fc6f480.zip |
Merge pull request #3106 from wallabag/api-content
Allow other fields to be send using API
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller')
-rw-r--r-- | tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | 8 | ||||
-rw-r--r-- | tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php index 4ca6e623..2c492c20 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php | |||
@@ -112,16 +112,16 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase | |||
112 | ->get('doctrine.orm.entity_manager') | 112 | ->get('doctrine.orm.entity_manager') |
113 | ->getRepository('WallabagCoreBundle:Entry') | 113 | ->getRepository('WallabagCoreBundle:Entry') |
114 | ->findByUrlAndUserId( | 114 | ->findByUrlAndUserId( |
115 | 'https://framablog.org/2014/02/05/framabag-service-libre-gratuit-interview-developpeur/', | 115 | 'http://www.framablog.org/index.php/post/2014/02/05/Framabag-service-libre-gratuit-interview-developpeur', |
116 | $this->getLoggedInUserId() | 116 | $this->getLoggedInUserId() |
117 | ); | 117 | ); |
118 | 118 | ||
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->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is ok'); | 122 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.framablog.org is empty'); |
123 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is ok'); | 123 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.framablog.org is empty'); |
124 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.framablog.org is ok'); | 124 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.framablog.org is empty'); |
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'); |
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index 18a02522..24893259 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php | |||
@@ -119,9 +119,10 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase | |||
119 | $this->getLoggedInUserId() | 119 | $this->getLoggedInUserId() |
120 | ); | 120 | ); |
121 | 121 | ||
122 | $this->assertNotEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is ok'); | 122 | // empty because it wasn't re-imported |
123 | $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is ok'); | 123 | $this->assertEmpty($content->getMimetype(), 'Mimetype for http://www.liberation.fr is empty'); |
124 | $this->assertNotEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is ok'); | 124 | $this->assertEmpty($content->getPreviewPicture(), 'Preview picture for http://www.liberation.fr is empty'); |
125 | $this->assertEmpty($content->getLanguage(), 'Language for http://www.liberation.fr is empty'); | ||
125 | 126 | ||
126 | $tags = $content->getTags(); | 127 | $tags = $content->getTags(); |
127 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); | 128 | $this->assertContains('foot', $tags, 'It includes the "foot" tag'); |