Skip to content

Commit f41c34a

Browse files
committed
refactoring
1 parent 1542608 commit f41c34a

File tree

1 file changed

+32
-32
lines changed
  • dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice

1 file changed

+32
-32
lines changed

dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/SaveTest.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -217,38 +217,6 @@ public function testPartialInvoiceWitConfigurableProduct(): void
217217
$this->assertEquals($orderItems[0], $orderItems[1]);
218218
}
219219

220-
/**
221-
* Get order items qty invoiced
222-
*
223-
* @param int $orderId
224-
* @return array
225-
*/
226-
private function getOrderItemsQtyInvoiced(int $orderId): array
227-
{
228-
$connection = $this->orderItemResource->getConnection();
229-
$select = $connection->select()
230-
->from($this->orderItemResource->getMainTable(), OrderItemInterface::QTY_INVOICED)
231-
->where(OrderItemInterface::ORDER_ID . ' = ?', $orderId);
232-
233-
return $connection->fetchCol($select);
234-
}
235-
236-
/**
237-
* Get order items qty ordered
238-
*
239-
* @param int $orderId
240-
* @return array
241-
*/
242-
private function getOrderItemsQtyOrdered(int $orderId): array
243-
{
244-
$connection = $this->orderItemResource->getConnection();
245-
$select = $connection->select()
246-
->from($this->orderItemResource->getMainTable(), OrderItemInterface::QTY_ORDERED)
247-
->where(OrderItemInterface::ORDER_ID . ' = ?', $orderId);
248-
249-
return $connection->fetchCol($select);
250-
}
251-
252220
/**
253221
* @magentoDataFixture Magento/Sales/_files/order_with_bundle_dynamic_price_no.php
254222
*
@@ -348,4 +316,36 @@ private function checkSuccess(
348316
);
349317
$this->assertSessionMessages($this->containsEqual((string)__($message)));
350318
}
319+
320+
/**
321+
* Get order items qty invoiced
322+
*
323+
* @param int $orderId
324+
* @return array
325+
*/
326+
private function getOrderItemsQtyInvoiced(int $orderId): array
327+
{
328+
$connection = $this->orderItemResource->getConnection();
329+
$select = $connection->select()
330+
->from($this->orderItemResource->getMainTable(), OrderItemInterface::QTY_INVOICED)
331+
->where(OrderItemInterface::ORDER_ID . ' = ?', $orderId);
332+
333+
return $connection->fetchCol($select);
334+
}
335+
336+
/**
337+
* Get order items qty ordered
338+
*
339+
* @param int $orderId
340+
* @return array
341+
*/
342+
private function getOrderItemsQtyOrdered(int $orderId): array
343+
{
344+
$connection = $this->orderItemResource->getConnection();
345+
$select = $connection->select()
346+
->from($this->orderItemResource->getMainTable(), OrderItemInterface::QTY_ORDERED)
347+
->where(OrderItemInterface::ORDER_ID . ' = ?', $orderId);
348+
349+
return $connection->fetchCol($select);
350+
}
351351
}

0 commit comments

Comments
 (0)