Skip to content

Commit 40e0a7b

Browse files
author
Alex Bomko
committed
MAGETWO-38946: Create pull request for a sprint 22 results
1 parent c5b33a2 commit 40e0a7b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/StockItemTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ class StockItemTest extends WebapiAbstract
2929
/**
3030
* Resource path
3131
*/
32-
const RESOURCE_PATH = '/V1/stockItems';
32+
const RESOURCE_GET_PATH = '/V1/stockItems';
33+
34+
/**
35+
* Resource path
36+
*/
37+
const RESOURCE_PUT_PATH = '/V1/products/:productSku/stockItems/:itemId';
3338

3439
/** @var \Magento\Catalog\Model\Resource\Product\Collection */
3540
protected $productCollection;
@@ -73,7 +78,7 @@ protected function getStockItemBySku($result)
7378
$productSku = 'simple1';
7479
$serviceInfo = [
7580
'rest' => [
76-
'resourcePath' => self::RESOURCE_PATH . "/$productSku",
81+
'resourcePath' => self::RESOURCE_GET_PATH . "/$productSku",
7782
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET,
7883
],
7984
'soap' => [
@@ -100,9 +105,13 @@ public function testStockItemPUTWithWrongInput($newData, $expectedResult, $fixtu
100105
{
101106
$stockItemOld = $this->getStockItemBySku($fixtureData);
102107
$productSku = 'simple1';
108+
$itemId = $stockItemOld['item_id'];
109+
110+
$resourcePath = str_replace([':productSku', ':itemId'], [$productSku, $itemId], self::RESOURCE_PUT_PATH);
111+
103112
$serviceInfo = [
104113
'rest' => [
105-
'resourcePath' => self::RESOURCE_PATH . "/$productSku",
114+
'resourcePath' => $resourcePath,
106115
'httpMethod' => \Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_PUT,
107116
],
108117
'soap' => [

dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ protected function setUp()
3232
)->setConstructorArgs(
3333
[
3434
$objectManager->get('Magento\Framework\Model\Context'),
35-
$objectManager->get('Magento\Framework\View\DesignInterface'),
3635
$objectManager->get('Magento\Framework\Registry'),
36+
$objectManager->get('Magento\Framework\View\DesignInterface'),
3737
$objectManager->get('Magento\Store\Model\App\Emulation'),
3838
$objectManager->get('Magento\Store\Model\StoreManager'),
3939
$objectManager->create('Magento\Framework\Filesystem'),

0 commit comments

Comments
 (0)