aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-09-16 22:22:25 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-09-16 22:22:25 +0200
commitebe0787e093f4f2934430033015d6ebad1c64dca (patch)
tree0e28c1da4fdb1ee48ae021a4e63d9a8ee1ec302d /tests/Wallabag/ImportBundle/Import/PocketImportTest.php
parent4fc998245c56ad95c1e753ab52b0c702d4a8a59d (diff)
downloadwallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.tar.gz
wallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.tar.zst
wallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.zip
Moved Pocket token to user config
Diffstat (limited to 'tests/Wallabag/ImportBundle/Import/PocketImportTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index a3f68892..48fbbfb6 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -4,6 +4,7 @@ namespace Tests\Wallabag\ImportBundle\Import;
4 4
5use Wallabag\UserBundle\Entity\User; 5use Wallabag\UserBundle\Entity\User;
6use Wallabag\CoreBundle\Entity\Entry; 6use Wallabag\CoreBundle\Entity\Entry;
7use Wallabag\CoreBundle\Entity\Config;
7use Wallabag\ImportBundle\Import\PocketImport; 8use Wallabag\ImportBundle\Import\PocketImport;
8use GuzzleHttp\Client; 9use GuzzleHttp\Client;
9use GuzzleHttp\Subscriber\Mock; 10use GuzzleHttp\Subscriber\Mock;
@@ -27,6 +28,11 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
27 { 28 {
28 $this->user = new User(); 29 $this->user = new User();
29 30
31 $config = new Config($this->user);
32 $config->setPocketConsumerKey('xxx');
33
34 $this->user->setConfig($config);
35
30 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy') 36 $this->contentProxy = $this->getMockBuilder('Wallabag\CoreBundle\Helper\ContentProxy')
31 ->disableOriginalConstructor() 37 ->disableOriginalConstructor()
32 ->getMock(); 38 ->getMock();
@@ -35,19 +41,9 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase
35 ->disableOriginalConstructor() 41 ->disableOriginalConstructor()
36 ->getMock(); 42 ->getMock();
37 43
38 $config = $this->getMockBuilder('Craue\ConfigBundle\Util\Config')
39 ->disableOriginalConstructor()
40 ->getMock();
41
42 $config->expects($this->any())
43 ->method('get')
44 ->with('pocket_consumer_key')
45 ->willReturn($consumerKey);
46
47 $pocket = new PocketImport( 44 $pocket = new PocketImport(
48 $this->em, 45 $this->em,
49 $this->contentProxy, 46 $this->contentProxy
50 $config
51 ); 47 );
52 $pocket->setUser($this->user); 48 $pocket->setUser($this->user);
53 49