diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-16 22:22:25 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-16 22:22:25 +0200 |
commit | ebe0787e093f4f2934430033015d6ebad1c64dca (patch) | |
tree | 0e28c1da4fdb1ee48ae021a4e63d9a8ee1ec302d /tests | |
parent | 4fc998245c56ad95c1e753ab52b0c702d4a8a59d (diff) | |
download | wallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.tar.gz wallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.tar.zst wallabag-ebe0787e093f4f2934430033015d6ebad1c64dca.zip |
Moved Pocket token to user config
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/ImportBundle/Import/PocketImportTest.php | 18 |
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 | ||
5 | use Wallabag\UserBundle\Entity\User; | 5 | use Wallabag\UserBundle\Entity\User; |
6 | use Wallabag\CoreBundle\Entity\Entry; | 6 | use Wallabag\CoreBundle\Entity\Entry; |
7 | use Wallabag\CoreBundle\Entity\Config; | ||
7 | use Wallabag\ImportBundle\Import\PocketImport; | 8 | use Wallabag\ImportBundle\Import\PocketImport; |
8 | use GuzzleHttp\Client; | 9 | use GuzzleHttp\Client; |
9 | use GuzzleHttp\Subscriber\Mock; | 10 | use 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 | ||