@@ -389,82 +389,6 @@ public function test_mark_tos_accepted_account_reconnect_exception() {
389
389
$ this ->assertEquals ( 'Please reconnect your Jetpack account. ' , $ tos ->message () );
390
390
}
391
391
392
- public function test_get_account_review_status () {
393
- $ this ->options ->expects ( $ this ->exactly ( 2 ) )->method ( 'get_merchant_id ' )->willReturn ( self ::TEST_MERCHANT_ID );
394
-
395
- $ accounts = [
396
- [
397
- 'id ' => self ::TEST_MERCHANT_ID ,
398
- 'subaccount ' => true ,
399
- ],
400
- [
401
- 'id ' => 34567812 ,
402
- 'subaccount ' => false ,
403
- ],
404
- ];
405
-
406
- $ review_status = [
407
- 'freeListingsProgram ' => 'freeListingsProgram ' ,
408
- 'shoppingAdsProgram ' => 'shoppingAdsProgram ' ,
409
- ];
410
-
411
- $ this ->generate_account_review_mock ( $ accounts , $ review_status );
412
-
413
- $ this ->assertEquals ( $ this ->middleware ->get_account_review_status (), $ review_status );
414
- }
415
-
416
- public function test_get_account_review_status_standalone () {
417
- $ this ->options ->expects ( $ this ->once () )->method ( 'get_merchant_id ' )->willReturn ( self ::TEST_MERCHANT_ID );
418
-
419
- $ accounts = [
420
- [
421
- 'id ' => self ::TEST_MERCHANT_ID ,
422
- 'subaccount ' => false ,
423
- ],
424
- [
425
- 'id ' => 34567812 ,
426
- 'subaccount ' => true ,
427
- ],
428
- ];
429
-
430
- $ this ->generate_request_mock ( $ accounts );
431
- $ this ->assertEquals ( $ this ->middleware ->get_account_review_status (), [] );
432
- }
433
-
434
-
435
- public function test_get_account_review_status_exception () {
436
- $ this ->options ->expects ( $ this ->once () )->method ( 'get_merchant_id ' )->willReturn ( self ::TEST_MERCHANT_ID );
437
-
438
- $ this ->generate_request_mock_exception ( 'Some exception ' );
439
-
440
- $ this ->expectException ( Exception::class );
441
- $ this ->expectExceptionMessage ( 'Error retrieving accounts ' );
442
- $ this ->expectExceptionCode ( 400 );
443
-
444
- $ this ->middleware ->get_account_review_status ();
445
- }
446
-
447
-
448
- public function test_get_account_review_status_error () {
449
- $ this ->options ->expects ( $ this ->exactly ( 2 ) )->method ( 'get_merchant_id ' )->willReturn ( self ::TEST_MERCHANT_ID );
450
-
451
- $ accounts = [
452
- [
453
- 'id ' => self ::TEST_MERCHANT_ID ,
454
- 'subaccount ' => true ,
455
- ],
456
- ];
457
-
458
- $ review_status = [];
459
-
460
- $ this ->generate_account_review_mock ( $ accounts , $ review_status );
461
-
462
- $ this ->expectException ( Exception::class );
463
- $ this ->expectExceptionMessage ( 'Invalid response getting account review status ' );
464
-
465
- $ this ->middleware ->get_account_review_status ();
466
- }
467
-
468
392
public function test_get_sdi_auth_endpoint () {
469
393
$ this ->assertEquals (
470
394
$ this ->middleware ->get_sdi_auth_endpoint (),
0 commit comments