8
8
namespace Magento \GraphQl \Quote \Customer ;
9
9
10
10
use Magento \Integration \Api \CustomerTokenServiceInterface ;
11
- use Magento \Quote \Api \CartRepositoryInterface ;
12
- use Magento \Quote \Model \Quote ;
13
11
use Magento \Quote \Model \QuoteFactory ;
14
12
use Magento \Quote \Model \QuoteIdToMaskedQuoteIdInterface ;
15
13
use Magento \Quote \Model \ResourceModel \Quote as QuoteResource ;
@@ -37,11 +35,6 @@ class SetBillingAddressOnCartTest extends GraphQlAbstract
37
35
*/
38
36
private $ quoteIdToMaskedId ;
39
37
40
- /**
41
- * @var CartRepositoryInterface
42
- */
43
- private $ quoteRepository ;
44
-
45
38
/**
46
39
* @var Address
47
40
*/
@@ -57,7 +50,6 @@ protected function setUp()
57
50
$ objectManager = Bootstrap::getObjectManager ();
58
51
$ this ->quoteResource = $ objectManager ->get (QuoteResource::class);
59
52
$ this ->quoteFactory = $ objectManager ->get (QuoteFactory::class);
60
- $ this ->quoteRepository = $ objectManager ->get (CartRepositoryInterface::class);
61
53
$ this ->quoteIdToMaskedId = $ objectManager ->get (QuoteIdToMaskedQuoteIdInterface::class);
62
54
$ this ->quoteShippingAddress = $ objectManager ->get (Address::class);
63
55
$ this ->customerTokenService = $ objectManager ->get (CustomerTokenServiceInterface::class);
@@ -423,36 +415,10 @@ public function testSetBillingAddressIfCustomerIsNotOwnerOfAddress()
423
415
* @magentoApiDataFixture Magento/Customer/_files/customer_two_addresses.php
424
416
* @throws \Exception
425
417
*/
426
- public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresses ()
418
+ public function testSetBillingAddressWithUseForShippingOption ()
427
419
{
428
420
$ maskedQuoteId = $ this ->getMaskedQuoteIdByReversedQuoteId ('test_order_1 ' );
429
421
430
- /** @var Quote $quote */
431
- $ quote = $ this ->quoteFactory ->create ();
432
- $ this ->quoteResource ->load ($ quote , 'test_order_1 ' , 'reserved_order_id ' );
433
-
434
- /** @var \Magento\Quote\Model\Quote\Address $quoteShippingAddress */
435
- $ quoteShippingAddress = $ this ->quoteShippingAddress ;
436
-
437
- $ quoteShippingAddress ->setData ([
438
- 'attribute_set_id ' => 2 ,
439
- 'telephone ' => 3468676 ,
440
- 'postcode ' => 75477 ,
441
- 'country_id ' => 'US ' ,
442
- 'city ' => 'CityM ' ,
443
- 'company ' => 'CompanyName ' ,
444
- 'street ' => 'Green str, 67 ' ,
445
- 'lastname ' => 'Smith ' ,
446
- 'firstname ' => 'John ' ,
447
- 'parent_id ' => 1 ,
448
- 'region_id ' => 1 ,
449
- ]);
450
-
451
- $ quote ->setIsMultiShipping (1 )
452
- ->setShippingAddress ($ quoteShippingAddress );
453
-
454
- $ this ->quoteRepository ->save ($ quote );
455
-
456
422
$ query = <<<QUERY
457
423
mutation {
458
424
setBillingAddressOnCart(
@@ -493,9 +459,6 @@ public function testSetBillingAddressWithUseForShippingOptionForMultipleAddresse
493
459
}
494
460
}
495
461
QUERY ;
496
- $ this ->expectExceptionMessage (
497
- "Using the \"use_for_shipping \" option with multishipping is not possible. "
498
- );
499
462
$ this ->graphQlQuery ($ query , [], '' , $ this ->getHeaderMap ());
500
463
}
501
464
0 commit comments