aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
index acc39997..2c492c20 100644
--- a/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
+++ b/tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
@@ -112,24 +112,22 @@ 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 $tag = $client->getContainer()
120 ->get('doctrine.orm.entity_manager')
121 ->getRepository('WallabagCoreBundle:Tag')
122 ->findOneByLabel('Framabag');
123
124 $this->assertTrue($content->getTags()->contains($tag));
125
126 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); 119 $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
127 $this->assertContains('flashes.import.notice.summary', $body[0]); 120 $this->assertContains('flashes.import.notice.summary', $body[0]);
128 121
129 $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');
130 $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');
131 $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');
132 $this->assertEquals(1, count($content->getTags())); 125
126 $tags = $content->getTags();
127 $this->assertContains('foot', $tags, 'It includes the "foot" tag');
128 $this->assertContains('Framabag', $tags, 'It includes the "Framabag" tag');
129 $this->assertEquals(2, count($tags));
130
133 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt()); 131 $this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
134 } 132 }
135 133