5
5
*/
6
6
namespace Magento \Quote \Model \Quote ;
7
7
8
- use Magento \Store \Api \StoreRepositoryInterface ;
9
8
use Magento \TestFramework \Helper \Bootstrap ;
10
9
11
10
/**
@@ -26,9 +25,6 @@ class AddressTest extends \Magento\TestFramework\Indexer\TestCase
26
25
/**@var \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository */
27
26
protected $ customerRepository ;
28
27
29
- /** @var StoreRepositoryInterface */
30
- private $ storeRepository ;
31
-
32
28
public static function setUpBeforeClass ()
33
29
{
34
30
$ db = \Magento \TestFramework \Helper \Bootstrap::getInstance ()->getBootstrap ()
@@ -65,8 +61,6 @@ public function setUp()
65
61
$ this ->_address ->setId (1 );
66
62
$ this ->_address ->load ($ this ->_address ->getId ());
67
63
$ this ->_address ->setQuote ($ this ->_quote );
68
- $ this ->storeRepository = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
69
- ->create (StoreRepositoryInterface::class);
70
64
}
71
65
72
66
protected function tearDown ()
@@ -328,50 +322,4 @@ public function dataProvider()
328
322
[[123 , true ], [123 , true ]]
329
323
];
330
324
}
331
-
332
- /**
333
- * Tests different shipping rates for different stores.
334
- *
335
- * @magentoDataFixture Magento/Store/_files/second_website_with_two_stores.php
336
- * @magentoDataFixture Magento/Sales/_files/quote_with_customer.php
337
- * @magentoDataFixture Magento/Customer/_files/customer_two_addresses.php
338
- * @magentoDataFixture Magento/Sales/_files/quote.php
339
- * @magentoConfigFixture default_store carriers/flatrate/price 5
340
- * @magentoConfigFixture fixture_second_store_store carriers/flatrate/price 10
341
- * @magentoAppIsolation enabled
342
- * @magentoDbIsolation disabled
343
- * @dataProvider requestShippingRatesDataProvider
344
- */
345
- public function testRequestShippingRates ($ storeCode , $ expectedRate )
346
- {
347
- $ store = $ this ->storeRepository ->get ($ storeCode );
348
- $ this ->_quote ->setStoreId ($ store ->getId ());
349
- $ this ->_address ->setItemQty (1 );
350
- $ this ->_address ->requestShippingRates ();
351
- /**
352
- * @var \Magento\Quote\Model\ResourceModel\Quote\Address\Rate\Collection $shippingRatesCollection
353
- */
354
- $ shippingRatesCollection = $ this ->_address ->getShippingRatesCollection ();
355
- /**
356
- * @var \Magento\Quote\Model\Quote\Address\Rate[] $shippingRates
357
- */
358
- $ shippingRates = $ shippingRatesCollection ->getItems ();
359
- self ::assertEquals (
360
- $ expectedRate ,
361
- $ shippingRates [0 ]->getPrice ()
362
- );
363
- }
364
-
365
- /**
366
- * Data provider for testRequestShippingRates.
367
- *
368
- * @return array
369
- */
370
- public function requestShippingRatesDataProvider ()
371
- {
372
- return [
373
- ['default ' , 5 ],
374
- ['fixture_second_store ' , 10 ],
375
- ];
376
- }
377
325
}
0 commit comments