Skip to content

Commit d90d553

Browse files
committed
fix(ci): mock concrete Order model instead of OrderInterface to avoid 274 abstract methods
1 parent 59801ec commit d90d553

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Test/Unit/Model/Indexer/Order/OrderDataBuilderTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Magento\Customer\Api\GroupRepositoryInterface;
99
use Magento\Sales\Api\Data\OrderAddressInterface;
1010
use Magento\Sales\Api\Data\OrderInterface;
11+
use Magento\Sales\Model\Order;
1112
use Magento\Sales\Api\Data\OrderItemInterface;
1213
use Magento\Sales\Api\Data\OrderPaymentInterface;
1314
use Magento\Sales\Model\ResourceModel\Order\Collection as OrderCollection;
@@ -189,17 +190,15 @@ public function test_get_order_collection_does_not_filter_entity_ids_when_empty(
189190
}
190191

191192
/**
192-
* @return OrderInterface&MockObject
193+
* @return Order&MockObject
193194
*/
194195
private function createOrderMock(
195196
bool $withShippingAddress = true,
196197
bool $withBillingAddress = true,
197198
bool $withPayment = true,
198199
bool $withChildItem = false,
199200
): MockObject {
200-
$order = $this->getMockBuilder(OrderInterface::class)
201-
->addMethods(['getShippingAddress'])
202-
->getMock();
201+
$order = $this->createMock(Order::class);
203202

204203
$order->method('getEntityId')->willReturn('42');
205204
$order->method('getIncrementId')->willReturn('000000042');

0 commit comments

Comments
 (0)