aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle
diff options
context:
space:
mode:
authorKévin Gomez <contact@kevingomez.fr>2015-10-31 16:38:49 +0100
committerKévin Gomez <contact@kevingomez.fr>2015-11-11 16:27:53 +0100
commit0c5bcd82bafbc91820857f7647186431273bc483 (patch)
treeecd2f31c9ea73710326d86693c4c3de9fe219a33 /src/Wallabag/CoreBundle
parent7b1648961d2a9770e801f414d297efe3aace07e8 (diff)
downloadwallabag-0c5bcd82bafbc91820857f7647186431273bc483.tar.gz
wallabag-0c5bcd82bafbc91820857f7647186431273bc483.tar.zst
wallabag-0c5bcd82bafbc91820857f7647186431273bc483.zip
Use Psr\Log\NullLogger instead of creating a mock
Diffstat (limited to 'src/Wallabag/CoreBundle')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
index f59edb0c..ef7cbd5b 100644
--- a/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Helper/ContentProxyTest.php
@@ -2,6 +2,9 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Helper; 3namespace Wallabag\CoreBundle\Tests\Helper;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
6use Psr\Log\NullLogger;
7
5use Wallabag\CoreBundle\Entity\Entry; 8use Wallabag\CoreBundle\Entity\Entry;
6use Wallabag\UserBundle\Entity\User; 9use Wallabag\UserBundle\Entity\User;
7use Wallabag\CoreBundle\Helper\ContentProxy; 10use Wallabag\CoreBundle\Helper\ContentProxy;
@@ -29,7 +32,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
29 'language' => '', 32 'language' => '',
30 )); 33 ));
31 34
32 $proxy = new ContentProxy($graby, $tagger, $this->getLoggerMock()); 35 $proxy = new ContentProxy($graby, $tagger, $this->getLogger());
33 $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0'); 36 $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0');
34 37
35 $this->assertEquals('http://0.0.0.0', $entry->getUrl()); 38 $this->assertEquals('http://0.0.0.0', $entry->getUrl());
@@ -67,7 +70,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
67 ), 70 ),
68 )); 71 ));
69 72
70 $proxy = new ContentProxy($graby, $tagger, $this->getLoggerMock()); 73 $proxy = new ContentProxy($graby, $tagger, $this->getLogger());
71 $entry = $proxy->updateEntry(new Entry(new User()), 'http://domain.io'); 74 $entry = $proxy->updateEntry(new Entry(new User()), 'http://domain.io');
72 75
73 $this->assertEquals('http://domain.io', $entry->getUrl()); 76 $this->assertEquals('http://domain.io', $entry->getUrl());
@@ -106,7 +109,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
106 ), 109 ),
107 )); 110 ));
108 111
109 $proxy = new ContentProxy($graby, $tagger, $this->getLoggerMock()); 112 $proxy = new ContentProxy($graby, $tagger, $this->getLogger());
110 $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0'); 113 $entry = $proxy->updateEntry(new Entry(new User()), 'http://0.0.0.0');
111 114
112 $this->assertEquals('http://1.1.1.1', $entry->getUrl()); 115 $this->assertEquals('http://1.1.1.1', $entry->getUrl());
@@ -127,8 +130,8 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
127 ->getMock(); 130 ->getMock();
128 } 131 }
129 132
130 private function getLoggerMock() 133 private function getLogger()
131 { 134 {
132 return $this->getMock('Psr\Log\LoggerInterface'); 135 return new NullLogger();
133 } 136 }
134} 137}