From 149268c5c30267a04d50f8cc63f2ea3df0b8708e Mon Sep 17 00:00:00 2001 From: Andrew Garside Date: Sun, 12 Nov 2017 14:24:12 +1000 Subject: [PATCH] Update the fixture and tests to reflect the functionality of getShippingMethod --- .../testsuite/Magento/Sales/Service/V1/OrderCreateTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderCreateTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderCreateTest.php index b61bfdabe25cd..a907faac98b72 100755 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderCreateTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderCreateTest.php @@ -140,7 +140,7 @@ protected function prepareOrder() [ 'shipping' => [ 'address' => $address, - 'method' => 'Flat Rate - Fixed' + 'method' => 'flatrate_flatrate' ], 'items' => [$orderItem->getData()], 'stock_id' => null, @@ -232,6 +232,9 @@ public function testOrderCreate() $this->assertEquals($order['grand_total'], $model->getGrandTotal()); $this->assertNotNull($model->getShippingAddress()); $this->assertTrue((bool)$model->getShippingAddress()->getId()); - $this->assertEquals('Flat Rate - Fixed', $model->getShippingMethod()); + $this->assertEquals('Flat Rate - Fixed', $model->getShippingDescription()); + $shippingMethod = $model->getShippingMethod(true); + $this->assertEquals('flatrate', $shippingMethod['carrier_code']); + $this->assertEquals('flatrate', $shippingMethod['method']); } }