]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
Remove htmlawed and use graby instead
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Helper / ContentProxyTest.php
index 7a50b3737284f002d1a2b81d2767f0798ff1ae1b..11f1d410fb8a39a207697cb06488e74965e12c18 100644 (file)
@@ -210,16 +210,18 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
         $tagger->expects($this->once())
             ->method('tag');
 
-        $graby = $this->getMockBuilder('Graby\Graby')->getMock();
-
-        $proxy = new ContentProxy($graby, $tagger, $this->getLogger(), $this->fetchingErrorMessage);
-        $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0', [
-            'html' => str_repeat('this is my content', 325),
-            'title' => 'this is my title',
-            'url' => 'http://1.1.1.1',
-            'content_type' => 'text/html',
-            'language' => 'fr',
-        ]);
+        $proxy = new ContentProxy((new Graby()), $tagger, $this->getLogger(), $this->fetchingErrorMessage);
+        $entry = $proxy->updateEntry(
+            new Entry(new User()),
+            'http://0.0.0.0',
+            [
+                'html' => str_repeat('this is my content', 325),
+                'title' => 'this is my title',
+                'url' => 'http://1.1.1.1',
+                'content_type' => 'text/html',
+                'language' => 'fr',
+            ]
+        );
 
         $this->assertEquals('http://1.1.1.1', $entry->getUrl());
         $this->assertEquals('this is my title', $entry->getTitle());
@@ -277,9 +279,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
         $tagger->expects($this->once())
             ->method('tag');
 
-        $graby = new Graby();
-
-        $proxy = new ContentProxy($graby, $tagger, $this->getTagRepositoryMock(), $this->getLogger(), $this->fetchingErrorMessage);
+        $proxy = new ContentProxy((new Graby()), $tagger, $this->getLogger(), $this->fetchingErrorMessage);
         $entry = $proxy->updateEntry(
             new Entry(new User()),
             'http://1.1.1.1',