aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Wallabag/ImportBundle/Import/PocketImportTest.php')
-rw-r--r--tests/Wallabag/ImportBundle/Import/PocketImportTest.php411
1 files changed, 188 insertions, 223 deletions
diff --git a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
index baa5d905..40e1626b 100644
--- a/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
+++ b/tests/Wallabag/ImportBundle/Import/PocketImportTest.php
@@ -2,10 +2,8 @@
2 2
3namespace Tests\Wallabag\ImportBundle\Import; 3namespace Tests\Wallabag\ImportBundle\Import;
4 4
5use GuzzleHttp\Client; 5use GuzzleHttp\Psr7\Response;
6use GuzzleHttp\Message\Response; 6use Http\Mock\Client as HttpMockClient;
7use GuzzleHttp\Stream\Stream;
8use GuzzleHttp\Subscriber\Mock;
9use M6Web\Component\RedisMock\RedisMockFactory; 7use M6Web\Component\RedisMock\RedisMockFactory;
10use Monolog\Handler\TestHandler; 8use Monolog\Handler\TestHandler;
11use Monolog\Logger; 9use Monolog\Logger;
@@ -38,16 +36,11 @@ class PocketImportTest extends TestCase
38 36
39 public function testOAuthRequest() 37 public function testOAuthRequest()
40 { 38 {
41 $client = new Client(); 39 $httpMockClient = new HttpMockClient();
42 40 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['code' => 'wunderbar_code'])));
43 $mock = new Mock([
44 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['code' => 'wunderbar_code']))),
45 ]);
46
47 $client->getEmitter()->attach($mock);
48 41
49 $pocketImport = $this->getPocketImport(); 42 $pocketImport = $this->getPocketImport();
50 $pocketImport->setClient($client); 43 $pocketImport->setClient($httpMockClient);
51 44
52 $code = $pocketImport->getRequestToken('http://0.0.0.0/redirect'); 45 $code = $pocketImport->getRequestToken('http://0.0.0.0/redirect');
53 46
@@ -56,16 +49,11 @@ class PocketImportTest extends TestCase
56 49
57 public function testOAuthRequestBadResponse() 50 public function testOAuthRequestBadResponse()
58 { 51 {
59 $client = new Client(); 52 $httpMockClient = new HttpMockClient();
60 53 $httpMockClient->addResponse(new Response(403));
61 $mock = new Mock([
62 new Response(403),
63 ]);
64
65 $client->getEmitter()->attach($mock);
66 54
67 $pocketImport = $this->getPocketImport(); 55 $pocketImport = $this->getPocketImport();
68 $pocketImport->setClient($client); 56 $pocketImport->setClient($httpMockClient);
69 57
70 $code = $pocketImport->getRequestToken('http://0.0.0.0/redirect'); 58 $code = $pocketImport->getRequestToken('http://0.0.0.0/redirect');
71 59
@@ -78,16 +66,11 @@ class PocketImportTest extends TestCase
78 66
79 public function testOAuthAuthorize() 67 public function testOAuthAuthorize()
80 { 68 {
81 $client = new Client(); 69 $httpMockClient = new HttpMockClient();
82 70 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
83 $mock = new Mock([
84 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))),
85 ]);
86
87 $client->getEmitter()->attach($mock);
88 71
89 $pocketImport = $this->getPocketImport(); 72 $pocketImport = $this->getPocketImport();
90 $pocketImport->setClient($client); 73 $pocketImport->setClient($httpMockClient);
91 74
92 $res = $pocketImport->authorize('wunderbar_code'); 75 $res = $pocketImport->authorize('wunderbar_code');
93 76
@@ -97,16 +80,11 @@ class PocketImportTest extends TestCase
97 80
98 public function testOAuthAuthorizeBadResponse() 81 public function testOAuthAuthorizeBadResponse()
99 { 82 {
100 $client = new Client(); 83 $httpMockClient = new HttpMockClient();
101 84 $httpMockClient->addResponse(new Response(403));
102 $mock = new Mock([
103 new Response(403),
104 ]);
105
106 $client->getEmitter()->attach($mock);
107 85
108 $pocketImport = $this->getPocketImport(); 86 $pocketImport = $this->getPocketImport();
109 $pocketImport->setClient($client); 87 $pocketImport->setClient($httpMockClient);
110 88
111 $res = $pocketImport->authorize('wunderbar_code'); 89 $res = $pocketImport->authorize('wunderbar_code');
112 90
@@ -122,94 +100,90 @@ class PocketImportTest extends TestCase
122 */ 100 */
123 public function testImport() 101 public function testImport()
124 { 102 {
125 $client = new Client(); 103 $httpMockClient = new HttpMockClient();
126 104 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
127 $mock = new Mock([ 105 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], <<<'JSON'
128 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 106 {
129 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(' 107 "status": 1,
130 { 108 "list": {
131 "status": 1, 109 "229279689": {
132 "list": { 110 "item_id": "229279689",
133 "229279689": { 111 "resolved_id": "229279689",
134 "item_id": "229279689", 112 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
135 "resolved_id": "229279689", 113 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
136 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview", 114 "favorite": "1",
137 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland", 115 "status": "1",
138 "favorite": "1", 116 "time_added": "1473020899",
139 "status": "1", 117 "time_updated": "1473020899",
140 "time_added": "1473020899", 118 "time_read": "0",
141 "time_updated": "1473020899", 119 "time_favorited": "0",
142 "time_read": "0", 120 "sort_id": 0,
143 "time_favorited": "0", 121 "resolved_title": "The Massive Ryder Cup Preview",
144 "sort_id": 0, 122 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
145 "resolved_title": "The Massive Ryder Cup Preview", 123 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
146 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview", 124 "is_article": "1",
147 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.", 125 "is_index": "0",
148 "is_article": "1", 126 "has_video": "1",
149 "is_index": "0", 127 "has_image": "1",
150 "has_video": "1", 128 "word_count": "3197",
151 "has_image": "1", 129 "images": {
152 "word_count": "3197", 130 "1": {
153 "images": { 131 "item_id": "229279689",
154 "1": { 132 "image_id": "1",
155 "item_id": "229279689", 133 "src": "http://a.espncdn.com/combiner/i?img=/photo/2012/0927/grant_g_ryder_cr_640.jpg&w=640&h=360",
156 "image_id": "1", 134 "width": "0",
157 "src": "http://a.espncdn.com/combiner/i?img=/photo/2012/0927/grant_g_ryder_cr_640.jpg&w=640&h=360", 135 "height": "0",
158 "width": "0", 136 "credit": "Jamie Squire/Getty Images",
159 "height": "0", 137 "caption": ""
160 "credit": "Jamie Squire/Getty Images", 138 }
161 "caption": "" 139 },
162 } 140 "videos": {
163 }, 141 "1": {
164 "videos": { 142 "item_id": "229279689",
165 "1": { 143 "video_id": "1",
166 "item_id": "229279689", 144 "src": "http://www.youtube.com/v/Er34PbFkVGk?version=3&hl=en_US&rel=0",
167 "video_id": "1", 145 "width": "420",
168 "src": "http://www.youtube.com/v/Er34PbFkVGk?version=3&hl=en_US&rel=0", 146 "height": "315",
169 "width": "420", 147 "type": "1",
170 "height": "315", 148 "vid": "Er34PbFkVGk"
171 "type": "1",
172 "vid": "Er34PbFkVGk"
173 }
174 },
175 "tags": {
176 "grantland": {
177 "item_id": "1147652870",
178 "tag": "grantland"
179 },
180 "Ryder Cup": {
181 "item_id": "1147652870",
182 "tag": "Ryder Cup"
183 }
184 } 149 }
185 }, 150 },
186 "229279690": { 151 "tags": {
187 "item_id": "229279689", 152 "grantland": {
188 "resolved_id": "229279689", 153 "item_id": "1147652870",
189 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview", 154 "tag": "grantland"
190 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland", 155 },
191 "favorite": "1", 156 "Ryder Cup": {
192 "status": "1", 157 "item_id": "1147652870",
193 "time_added": "1473020899", 158 "tag": "Ryder Cup"
194 "time_updated": "1473020899", 159 }
195 "time_read": "0",
196 "time_favorited": "0",
197 "sort_id": 1,
198 "resolved_title": "The Massive Ryder Cup Preview",
199 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
200 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
201 "is_article": "1",
202 "is_index": "0",
203 "has_video": "0",
204 "has_image": "0",
205 "word_count": "3197"
206 } 160 }
161 },
162 "229279690": {
163 "item_id": "229279689",
164 "resolved_id": "229279689",
165 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
166 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
167 "favorite": "1",
168 "status": "1",
169 "time_added": "1473020899",
170 "time_updated": "1473020899",
171 "time_read": "0",
172 "time_favorited": "0",
173 "sort_id": 1,
174 "resolved_title": "The Massive Ryder Cup Preview",
175 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
176 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
177 "is_article": "1",
178 "is_index": "0",
179 "has_video": "0",
180 "has_image": "0",
181 "word_count": "3197"
207 } 182 }
208 } 183 }
209 ')), 184 }
210 ]); 185JSON
211 186));
212 $client->getEmitter()->attach($mock);
213 187
214 $pocketImport = $this->getPocketImport('ConsumerKey', 1); 188 $pocketImport = $this->getPocketImport('ConsumerKey', 1);
215 189
@@ -226,6 +200,13 @@ class PocketImportTest extends TestCase
226 ->method('getRepository') 200 ->method('getRepository')
227 ->willReturn($entryRepo); 201 ->willReturn($entryRepo);
228 202
203 $this->em
204 ->expects($this->any())
205 ->method('persist')
206 ->with($this->callback(function ($persistedEntry) {
207 return $persistedEntry->isArchived() && $persistedEntry->isStarred();
208 }));
209
229 $entry = new Entry($this->user); 210 $entry = new Entry($this->user);
230 211
231 $this->contentProxy 212 $this->contentProxy
@@ -233,7 +214,7 @@ class PocketImportTest extends TestCase
233 ->method('updateEntry') 214 ->method('updateEntry')
234 ->willReturn($entry); 215 ->willReturn($entry);
235 216
236 $pocketImport->setClient($client); 217 $pocketImport->setClient($httpMockClient);
237 $pocketImport->authorize('wunderbar_code'); 218 $pocketImport->authorize('wunderbar_code');
238 219
239 $res = $pocketImport->import(); 220 $res = $pocketImport->import();
@@ -247,56 +228,52 @@ class PocketImportTest extends TestCase
247 */ 228 */
248 public function testImportAndMarkAllAsRead() 229 public function testImportAndMarkAllAsRead()
249 { 230 {
250 $client = new Client(); 231 $httpMockClient = new HttpMockClient();
251 232 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
252 $mock = new Mock([ 233 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], <<<'JSON'
253 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 234 {
254 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(' 235 "status": 1,
255 { 236 "list": {
256 "status": 1, 237 "229279689": {
257 "list": { 238 "item_id": "229279689",
258 "229279689": { 239 "resolved_id": "229279689",
259 "item_id": "229279689", 240 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview",
260 "resolved_id": "229279689", 241 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
261 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview", 242 "favorite": "1",
262 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland", 243 "status": "1",
263 "favorite": "1", 244 "time_added": "1473020899",
264 "status": "1", 245 "time_updated": "1473020899",
265 "time_added": "1473020899", 246 "time_read": "0",
266 "time_updated": "1473020899", 247 "time_favorited": "0",
267 "time_read": "0", 248 "sort_id": 0,
268 "time_favorited": "0", 249 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
269 "sort_id": 0, 250 "is_article": "1",
270 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.", 251 "has_video": "1",
271 "is_article": "1", 252 "has_image": "1",
272 "has_video": "1", 253 "word_count": "3197"
273 "has_image": "1", 254 },
274 "word_count": "3197" 255 "229279690": {
275 }, 256 "item_id": "229279689",
276 "229279690": { 257 "resolved_id": "229279689",
277 "item_id": "229279689", 258 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview/2",
278 "resolved_id": "229279689", 259 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland",
279 "given_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview/2", 260 "favorite": "1",
280 "given_title": "The Massive Ryder Cup Preview - The Triangle Blog - Grantland", 261 "status": "0",
281 "favorite": "1", 262 "time_added": "1473020899",
282 "status": "0", 263 "time_updated": "1473020899",
283 "time_added": "1473020899", 264 "time_read": "0",
284 "time_updated": "1473020899", 265 "time_favorited": "0",
285 "time_read": "0", 266 "sort_id": 1,
286 "time_favorited": "0", 267 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.",
287 "sort_id": 1, 268 "is_article": "1",
288 "excerpt": "The list of things I love about the Ryder Cup is so long that it could fill a (tedious) novel, and golf fans can probably guess most of them.", 269 "has_video": "0",
289 "is_article": "1", 270 "has_image": "0",
290 "has_video": "0", 271 "word_count": "3197"
291 "has_image": "0",
292 "word_count": "3197"
293 }
294 } 272 }
295 } 273 }
296 ')), 274 }
297 ]); 275JSON
298 276));
299 $client->getEmitter()->attach($mock);
300 277
301 $pocketImport = $this->getPocketImport('ConsumerKey', 2); 278 $pocketImport = $this->getPocketImport('ConsumerKey', 2);
302 279
@@ -328,7 +305,7 @@ class PocketImportTest extends TestCase
328 ->method('updateEntry') 305 ->method('updateEntry')
329 ->willReturn($entry); 306 ->willReturn($entry);
330 307
331 $pocketImport->setClient($client); 308 $pocketImport->setClient($httpMockClient);
332 $pocketImport->authorize('wunderbar_code'); 309 $pocketImport->authorize('wunderbar_code');
333 310
334 $res = $pocketImport->setMarkAsRead(true)->import(); 311 $res = $pocketImport->setMarkAsRead(true)->import();
@@ -342,7 +319,7 @@ class PocketImportTest extends TestCase
342 */ 319 */
343 public function testImportWithRabbit() 320 public function testImportWithRabbit()
344 { 321 {
345 $client = new Client(); 322 $httpMockClient = new HttpMockClient();
346 323
347 $body = <<<'JSON' 324 $body = <<<'JSON'
348{ 325{
@@ -367,19 +344,16 @@ class PocketImportTest extends TestCase
367} 344}
368JSON; 345JSON;
369 346
370 $mock = new Mock([ 347 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
371 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 348 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], <<<JSON
372 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(' 349 {
373 { 350 "status": 1,
374 "status": 1, 351 "list": {
375 "list": { 352 "229279690": $body
376 "229279690": ' . $body . '
377 }
378 } 353 }
379 ')), 354 }
380 ]); 355JSON
381 356 ));
382 $client->getEmitter()->attach($mock);
383 357
384 $pocketImport = $this->getPocketImport(); 358 $pocketImport = $this->getPocketImport();
385 359
@@ -413,7 +387,7 @@ JSON;
413 ->method('publish') 387 ->method('publish')
414 ->with(json_encode($bodyAsArray)); 388 ->with(json_encode($bodyAsArray));
415 389
416 $pocketImport->setClient($client); 390 $pocketImport->setClient($httpMockClient);
417 $pocketImport->setProducer($producer); 391 $pocketImport->setProducer($producer);
418 $pocketImport->authorize('wunderbar_code'); 392 $pocketImport->authorize('wunderbar_code');
419 393
@@ -428,7 +402,7 @@ JSON;
428 */ 402 */
429 public function testImportWithRedis() 403 public function testImportWithRedis()
430 { 404 {
431 $client = new Client(); 405 $httpMockClient = new HttpMockClient();
432 406
433 $body = <<<'JSON' 407 $body = <<<'JSON'
434{ 408{
@@ -453,19 +427,16 @@ JSON;
453} 427}
454JSON; 428JSON;
455 429
456 $mock = new Mock([ 430 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
457 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 431 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], <<<JSON
458 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(' 432 {
459 { 433 "status": 1,
460 "status": 1, 434 "list": {
461 "list": { 435 "229279690": $body
462 "229279690": ' . $body . '
463 }
464 } 436 }
465 ')), 437 }
466 ]); 438JSON
467 439 ));
468 $client->getEmitter()->attach($mock);
469 440
470 $pocketImport = $this->getPocketImport(); 441 $pocketImport = $this->getPocketImport();
471 442
@@ -492,7 +463,7 @@ JSON;
492 $queue = new RedisQueue($redisMock, 'pocket'); 463 $queue = new RedisQueue($redisMock, 'pocket');
493 $producer = new Producer($queue); 464 $producer = new Producer($queue);
494 465
495 $pocketImport->setClient($client); 466 $pocketImport->setClient($httpMockClient);
496 $pocketImport->setProducer($producer); 467 $pocketImport->setProducer($producer);
497 $pocketImport->authorize('wunderbar_code'); 468 $pocketImport->authorize('wunderbar_code');
498 469
@@ -506,17 +477,13 @@ JSON;
506 477
507 public function testImportBadResponse() 478 public function testImportBadResponse()
508 { 479 {
509 $client = new Client(); 480 $httpMockClient = new HttpMockClient();
510 481
511 $mock = new Mock([ 482 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
512 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 483 $httpMockClient->addResponse(new Response(403));
513 new Response(403),
514 ]);
515
516 $client->getEmitter()->attach($mock);
517 484
518 $pocketImport = $this->getPocketImport(); 485 $pocketImport = $this->getPocketImport();
519 $pocketImport->setClient($client); 486 $pocketImport->setClient($httpMockClient);
520 $pocketImport->authorize('wunderbar_code'); 487 $pocketImport->authorize('wunderbar_code');
521 488
522 $res = $pocketImport->import(); 489 $res = $pocketImport->import();
@@ -530,25 +497,23 @@ JSON;
530 497
531 public function testImportWithExceptionFromGraby() 498 public function testImportWithExceptionFromGraby()
532 { 499 {
533 $client = new Client(); 500 $httpMockClient = new HttpMockClient();
534 501
535 $mock = new Mock([ 502 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], json_encode(['access_token' => 'wunderbar_token'])));
536 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(json_encode(['access_token' => 'wunderbar_token']))), 503 $httpMockClient->addResponse(new Response(200, ['Content-Type' => 'application/json'], <<<'JSON'
537 new Response(200, ['Content-Type' => 'application/json'], Stream::factory(' 504 {
538 { 505 "status": 1,
539 "status": 1, 506 "list": {
540 "list": { 507 "229279689": {
541 "229279689": { 508 "status": "1",
542 "status": "1", 509 "favorite": "1",
543 "favorite": "1", 510 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
544 "resolved_url": "http://www.grantland.com/blog/the-triangle/post/_/id/38347/ryder-cup-preview"
545 }
546 } 511 }
547 } 512 }
548 ')), 513 }
549 ]); 514
550 515JSON
551 $client->getEmitter()->attach($mock); 516 ));
552 517
553 $pocketImport = $this->getPocketImport('ConsumerKey', 1); 518 $pocketImport = $this->getPocketImport('ConsumerKey', 1);
554 519
@@ -572,7 +537,7 @@ JSON;
572 ->method('updateEntry') 537 ->method('updateEntry')
573 ->will($this->throwException(new \Exception())); 538 ->will($this->throwException(new \Exception()));
574 539
575 $pocketImport->setClient($client); 540 $pocketImport->setClient($httpMockClient);
576 $pocketImport->authorize('wunderbar_code'); 541 $pocketImport->authorize('wunderbar_code');
577 542
578 $res = $pocketImport->import(); 543 $res = $pocketImport->import();