aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
index 1ad21d14..be287d84 100644
--- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
@@ -3,6 +3,8 @@
3namespace Tests\Wallabag\CoreBundle\Helper; 3namespace Tests\Wallabag\CoreBundle\Helper;
4 4
5use Psr\Log\NullLogger; 5use Psr\Log\NullLogger;
6use Monolog\Logger;
7use Monolog\Handler\TestHandler;
6use Wallabag\CoreBundle\Helper\ContentProxy; 8use Wallabag\CoreBundle\Helper\ContentProxy;
7use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
8use Wallabag\CoreBundle\Entity\Tag; 10use Wallabag\CoreBundle\Entity\Tag;
@@ -197,7 +199,8 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
197 ]); 199 ]);
198 200
199 $proxy = new ContentProxy($graby, $tagger, $this->getLogger(), $this->fetchingErrorMessage); 201 $proxy = new ContentProxy($graby, $tagger, $this->getLogger(), $this->fetchingErrorMessage);
200 $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0'); 202 $entry = new Entry(new User());
203 $proxy->updateEntry($entry, 'http://0.0.0.0');
201 204
202 $this->assertEquals('http://1.1.1.1', $entry->getUrl()); 205 $this->assertEquals('http://1.1.1.1', $entry->getUrl());
203 $this->assertEquals('this is my title', $entry->getTitle()); 206 $this->assertEquals('this is my title', $entry->getTitle());
@@ -255,7 +258,10 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
255 $tagger->expects($this->once()) 258 $tagger->expects($this->once())
256 ->method('tag'); 259 ->method('tag');
257 260
258 $proxy = new ContentProxy((new Graby()), $tagger, $this->getLogger(), $this->fetchingErrorMessage); 261 $logHandler = new TestHandler();
262 $logger = new Logger('test', array($logHandler));
263
264 $proxy = new ContentProxy((new Graby()), $tagger, $logger, $this->fetchingErrorMessage);
259 $entry = new Entry(new User()); 265 $entry = new Entry(new User());
260 $proxy->importEntry( 266 $proxy->importEntry(
261 $entry, 267 $entry,