diff --git a/Test/Unit/Model/Cart/FullUpdateTest.php b/Test/Unit/Model/Cart/FullUpdateTest.php index a646471..0877f62 100644 --- a/Test/Unit/Model/Cart/FullUpdateTest.php +++ b/Test/Unit/Model/Cart/FullUpdateTest.php @@ -6,7 +6,7 @@ * and LICENSE files that were distributed with this source code. */ -namespace Klarna\Kco\Test\Unit\Model\Checkout; +namespace Klarna\Kco\Test\Unit\Model\Cart; use Klarna\Kco\Model\Cart\FullUpdate; use Klarna\Base\Test\Unit\Mock\MockFactory; @@ -112,7 +112,12 @@ protected function setUp(): void $this->quote->method('getShippingAddress') ->willReturn($quoteShippingAddress); - $extensionAttributes = $this->mockFactory->create(CartExtension::class, [], ['getShippingAssignments']); + if (method_exists(CartExtension::class, 'getShippingAssignments')) { + $extensionAttributes = $this->mockFactory->create(CartExtension::class, ['getShippingAssignments']); + } else { + $extensionAttributes = $this->mockFactory->create(CartExtension::class, [], ['getShippingAssignments']); + } + $extensionAttributes->method('getShippingAssignments') ->willReturn([]);