Skip to content

Commit a888cd2

Browse files
MTA-4003: Refactor CreateInvoiceEntityTest in Sales module
1 parent b7b133b commit a888cd2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/MassOrdersUpdateTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,18 @@ protected function createOrders($count, $steps)
111111
*/
112112
protected function processSteps(OrderInjectable $order, $steps)
113113
{
114+
$products = $order->getEntityId()['products'];
115+
$cart['data']['items'] = ['products' => $products];
116+
$cart = $this->fixtureFactory->createByCode('cart', $cart);
114117
$steps = array_diff(explode(',', $steps), ['-']);
115118
foreach ($steps as $step) {
116119
$action = str_replace(' ', '', ucwords($step));
117120
$methodAction = (($action != 'OnHold') ? 'Create' : '') . $action . 'Step';
118121
$path = 'Magento\Sales\Test\TestStep';
119-
$processStep = $this->objectManager->create($path . '\\' . $methodAction, ['order' => $order]);
122+
$processStep = $this->objectManager->create(
123+
$path . '\\' . $methodAction,
124+
['order' => $order, 'cart' => $cart]
125+
);
120126
$processStep->run();
121127
}
122128
}

0 commit comments

Comments
 (0)