From f966f32847e9c88688a12e44dfcd91c232f242d7 Mon Sep 17 00:00:00 2001 From: Shradddha Date: Wed, 31 Jan 2024 11:59:01 +0530 Subject: [PATCH 1/8] AC-10621::PHPUnit 10 upgrade error'setMethod issue fix' --- .../SetDataToLegacyCatalogInventoryTest.php | 2 +- ...eLegacyStockStatusForConfigurableProductTest.php | 4 ++-- .../Model/ExtractPickupLocationAddressDataTest.php | 4 ++-- .../GetPickupLocationInformationPluginTest.php | 7 ++++--- .../Test/Unit/Model/Order/IsFulfillableTest.php | 13 +++++++------ 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php b/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php index d12105801cf9..24aef0e66156 100644 --- a/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php +++ b/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php @@ -95,7 +95,7 @@ protected function setUp(): void $this->areProductsSalable = $this->getMockBuilder(AreProductsSalableInterface::class) ->onlyMethods(['execute'])->disableOriginalConstructor()->getMockForAbstractClass(); $this->cacheCleaner = $this->getMockBuilder(CacheCleaner::class) - ->disableOriginalConstructor()->setMethods(['clean'])->getMock(); + ->disableOriginalConstructor()->onlyMethods(['clean'])->getMock(); $this->model = (new ObjectManager($this))->getObject( SetDataToLegacyCatalogInventory::class, [ diff --git a/InventoryConfigurableProduct/Test/Unit/Plugin/CatalogInventory/UpdateLegacyStockStatusForConfigurableProductTest.php b/InventoryConfigurableProduct/Test/Unit/Plugin/CatalogInventory/UpdateLegacyStockStatusForConfigurableProductTest.php index 6d6a5ae5316e..e883495192e5 100644 --- a/InventoryConfigurableProduct/Test/Unit/Plugin/CatalogInventory/UpdateLegacyStockStatusForConfigurableProductTest.php +++ b/InventoryConfigurableProduct/Test/Unit/Plugin/CatalogInventory/UpdateLegacyStockStatusForConfigurableProductTest.php @@ -101,7 +101,7 @@ public function testConfigurableStockAfterLegacySockItemSave() ->getMock(); $stockItemMock = $this->getMockBuilder(StockItem::class) ->disableOriginalConstructor() - ->setMethods([ + ->addMethods([ 'getQty', 'getIsInStock', 'getProductId', @@ -153,7 +153,7 @@ public function testConfigurableStockAfterLegacySockItemSaveNegativeScenario() ->getMock(); $stockItemMock = $this->getMockBuilder(StockItem::class) ->disableOriginalConstructor() - ->setMethods([ + ->addMethods([ 'getQty', 'getIsInStock', 'getProductId', diff --git a/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php b/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php index 439cf63f1319..6d1714875227 100644 --- a/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php +++ b/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php @@ -52,12 +52,12 @@ protected function setUp(): void $this->objectCopyServiceMock = $this->getMockBuilder(Copy::class) ->disableOriginalConstructor() - ->setMethods(['getDataFromFieldset']) + ->onlyMethods(['getDataFromFieldset']) ->getMockForAbstractClass(); $regionFactoryMock = $this->getMockBuilder(RegionFactory::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMockForAbstractClass(); $regionFactoryMock->expects($this->any()) diff --git a/InventoryInStorePickupQuote/Test/Unit/Plugin/Quote/AddressCollection/GetPickupLocationInformationPluginTest.php b/InventoryInStorePickupQuote/Test/Unit/Plugin/Quote/AddressCollection/GetPickupLocationInformationPluginTest.php index b5779697c264..ee8e0cd4537a 100644 --- a/InventoryInStorePickupQuote/Test/Unit/Plugin/Quote/AddressCollection/GetPickupLocationInformationPluginTest.php +++ b/InventoryInStorePickupQuote/Test/Unit/Plugin/Quote/AddressCollection/GetPickupLocationInformationPluginTest.php @@ -46,10 +46,11 @@ protected function setUp(): void { $this->addressExtensionInterfaceFactory = $this->getMockBuilder(AddressExtensionInterfaceFactory::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMockForAbstractClass(); $this->connection = $this->getMockBuilder(ResourceConnection::class) - ->setMethods(['getSelect', 'getTableName']) + ->onlyMethods(['getTableName']) + ->addMethods(['getSelect']) ->disableOriginalConstructor() ->getMock(); $objectManager = new ObjectManager($this); @@ -87,7 +88,7 @@ public function testExecute(): void )->willReturnSelf(); /** @var Collection|MockObject $collection */ $collection = $this->getMockBuilder(Collection::class) - ->setMethods(['getSelect', 'isLoaded']) + ->onlyMethods(['getSelect', 'isLoaded']) ->disableOriginalConstructor() ->getMock(); $collection->expects(self::exactly(2)) diff --git a/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php b/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php index 1451889b6b96..6b70d457d127 100644 --- a/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php +++ b/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php @@ -109,7 +109,7 @@ protected function setUp(): void { $this->sourceItemRepository = $this->getMockBuilder(SourceItemRepositoryInterface::class) ->disableOriginalConstructor() - ->setMethods(['getList']) + ->onlyMethods(['getList']) ->getMock(); $this->sourceRepository = $this->getMockBuilder(SourceRepositoryInterface::class) @@ -126,7 +126,8 @@ protected function setUp(): void $this->itemMock = $this->getMockBuilder(Item::class) ->disableOriginalConstructor() - ->setMethods(['getHasChildren', 'getQtyOrdered', 'getSku', 'getProduct']) + ->onlyMethods(['getQtyOrdered', 'getSku', 'getProduct']) + ->addMethods(['getHasChildren']) ->getMock(); $this->productMock = $this->getMockBuilder(Product::class) @@ -144,13 +145,13 @@ protected function setUp(): void $this->stockItemMock = $this->getMockBuilder(\Magento\CatalogInventory\Model\Stock\Item::class) ->disableOriginalConstructor() - ->setMethods(['getManageStock', 'getIsInStock']) + ->onlyMethods(['getManageStock', 'getIsInStock']) ->getMock(); $this->searchCriteriaBuilderFactory = $this ->getMockBuilder(SearchCriteriaBuilderFactory::class) ->disableOriginalConstructor() - ->setMethods(['create']) + ->onlyMethods(['create']) ->getMock(); $this->sourceItemSearchResultsInterface = $this @@ -161,7 +162,7 @@ protected function setUp(): void $this->abstractExtensibleObject = $this ->getMockBuilder(AbstractExtensibleObject::class) ->disableOriginalConstructor() - ->setMethods(['getQuantity', 'getStatus']) + ->addMethods(['getQuantity', 'getStatus']) ->getMock(); $this->searchCriteriaMock = $this @@ -172,7 +173,7 @@ protected function setUp(): void $this->searchCriteriaBuilderMock = $this ->getMockBuilder(SearchCriteriaBuilder::class) ->disableOriginalConstructor() - ->setMethods(['create', 'addFilter']) + ->onlyMethods(['create', 'addFilter']) ->getMock(); $this->model = new IsFulfillable( From 2eeea14635e0bad709414388a94055045715d570 Mon Sep 17 00:00:00 2001 From: jayrangnani-gl <142883278+jayrangnani-gl@users.noreply.github.com> Date: Tue, 20 Feb 2024 09:22:28 +0530 Subject: [PATCH 2/8] AC-10912::PHPUnit 10 upgrade Error: Call to undefined method withConsecutive() compatible with phpunit 9 and 10 - Fix unit tests --- ...gacyStockAfterDecrementStockPluginTest.php | 16 +++++++++---- .../Sync/APISourceItemIndexerPluginTest.php | 9 +++++-- .../UpdateLegacyStockStatusTest.php | 24 +++++++++---------- .../GetOrderDataForOrderInFinalStateTest.php | 20 ++++++++-------- ...rItemsDataForOrdersInNotFinalStateTest.php | 23 ++++++++++-------- .../Model/GetSalableQuantityDataBySkuTest.php | 9 +++++-- .../Listing/Column/SalableQuantityTest.php | 19 +++++++++++---- 7 files changed, 75 insertions(+), 45 deletions(-) diff --git a/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php b/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php index 25def6e0be1f..a2673df367f9 100644 --- a/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php +++ b/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php @@ -190,11 +190,17 @@ public function testAfterExecute($sourceCode, $productId, $itemSku, $qty, $stock $searchCriteria = $this->createMock(StockItemCriteriaInterface::class); $searchCriteria->expects($this->exactly(2)) ->method('addFilter') - ->withConsecutive( - [StockItemInterface::PRODUCT_ID, StockItemInterface::PRODUCT_ID, $productId], - [StockItemInterface::STOCK_ID, StockItemInterface::STOCK_ID, Stock::DEFAULT_STOCK_ID] - ) - ->willReturnSelf(); + ->willReturnCallback(function ($arg1, $arg2, $arg3) use ($productId, $searchCriteria) { + if ($arg1 == StockItemInterface::PRODUCT_ID && + $arg2 == StockItemInterface::PRODUCT_ID && + $arg3 == $productId) { + return $searchCriteria; + } elseif ($arg1 == StockItemInterface::STOCK_ID && + $arg2 == StockItemInterface::STOCK_ID && + $arg3 == Stock::DEFAULT_STOCK_ID) { + return $searchCriteria; + } + }); $stockItemCollection->expects($this->once())->method('getTotalCount')->willReturn(1); $this->legacyStockItemRepositoryMock->method('getList') ->willReturn($stockItemCollection); diff --git a/InventoryConfigurableProductIndexer/Test/Unit/Plugin/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/APISourceItemIndexerPluginTest.php b/InventoryConfigurableProductIndexer/Test/Unit/Plugin/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/APISourceItemIndexerPluginTest.php index e872774f96e4..e8321fcba8d7 100644 --- a/InventoryConfigurableProductIndexer/Test/Unit/Plugin/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/APISourceItemIndexerPluginTest.php +++ b/InventoryConfigurableProductIndexer/Test/Unit/Plugin/InventoryIndexer/Indexer/SourceItem/Strategy/Sync/APISourceItemIndexerPluginTest.php @@ -97,8 +97,13 @@ public function testAfterSave() ->willReturn([11 => 'child-1', 12 => 'child-2']); $this->getSourceItemsBySku->expects($this->exactly(2)) ->method('execute') - ->withConsecutive(['child-1'], ['child-2']) - ->willReturnOnConsecutiveCalls([$childSourceItem1], [$childSourceItem2]); + ->willReturnCallback(function ($arg) use ($childSourceItem1, $childSourceItem2) { + if ($arg == 'child-1') { + return [$childSourceItem1]; + } elseif ($arg == 'child-2') { + return [$childSourceItem2]; + } + }); $this->configurableProductsSourceItemIndexer->expects($this->once())->method('executeList')->with([1, 2]); $interceptorResult = $this->plugin->afterSave($subject, $result, $object); diff --git a/InventoryIndexer/Test/Unit/Model/ResourceModel/UpdateLegacyStockStatusTest.php b/InventoryIndexer/Test/Unit/Model/ResourceModel/UpdateLegacyStockStatusTest.php index 52f07c4390c4..290919d0d80f 100644 --- a/InventoryIndexer/Test/Unit/Model/ResourceModel/UpdateLegacyStockStatusTest.php +++ b/InventoryIndexer/Test/Unit/Model/ResourceModel/UpdateLegacyStockStatusTest.php @@ -63,18 +63,18 @@ public function testExecute(): void $tableName = 'cataloginventory_stock_status'; $this->connection->expects($this->exactly(2)) ->method('update') - ->withConsecutive( - [ - $tableName, - ['stock_status' => false], - ['product_id = ?' => 0] - ], - [ - $tableName, - ['stock_status' => true], - ['product_id = ?' => 1] - ], - ); + ->willReturnCallback(function ($arg1, $arg2, $arg3) use ($tableName) { + if ($arg1 == $tableName && + empty($arg2['stock_status']) && + $arg3['product_id = ?'] == 0) { + return ['stock_status' => false]; + } elseif ($arg1 == $tableName && + $arg2['stock_status'] == 1 && + $arg3['product_id = ?'] == 1) { + return ['stock_status' => true]; + } + }); + $this->model->execute($salability); } } diff --git a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php index 290d5fc7c2b7..330d1cde574e 100644 --- a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php +++ b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php @@ -87,16 +87,16 @@ public function testExecute(): void ->willReturnArgument(0); $this->resourceConnection->expects($this->exactly(2)) ->method('getConnection') - ->withConsecutive( - [$this->equalTo($salesConnectionName)], - [$this->equalTo($defaultConnectionName)] - ) - ->willReturnMap( - [ - [$salesConnectionName, $salesConnection], - [$defaultConnectionName, $defaultConnection], - ] - ); + ->willReturnCallback(function($arg) use ($salesConnectionName, + $defaultConnectionName, + $salesConnection, + $defaultConnection) { + if ($arg == $salesConnectionName) { + return $salesConnection; + } elseif ($arg == $defaultConnectionName) { + return $defaultConnection; + } + }); $this->assertEquals($expected, $this->model->execute([1, 2, 3], [])); } diff --git a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderItemsDataForOrdersInNotFinalStateTest.php b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderItemsDataForOrdersInNotFinalStateTest.php index f5562f4cb827..5f1aa9b574d4 100644 --- a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderItemsDataForOrdersInNotFinalStateTest.php +++ b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderItemsDataForOrdersInNotFinalStateTest.php @@ -91,16 +91,19 @@ public function testExecute(): void ->willReturnArgument(0); $this->resourceConnection->expects($this->exactly(2)) ->method('getConnection') - ->withConsecutive( - [$this->equalTo($salesConnectionName)], - [$this->equalTo($defaultConnectionName)] - ) - ->willReturnMap( - [ - [$salesConnectionName, $salesConnection], - [$defaultConnectionName, $defaultConnection], - ] - ); + ->willReturnCallback(function ($arg) use ( + $salesConnectionName, + $defaultConnectionName, + $salesConnection, + $defaultConnection +) { + if ($arg == $salesConnectionName) { + return $salesConnection; + } elseif ($arg == $defaultConnectionName) { + return $defaultConnection; + } + }); + $this->assertEquals($expected, $this->model->execute(10, 1)); } diff --git a/InventorySalesAdminUi/Test/Unit/Model/GetSalableQuantityDataBySkuTest.php b/InventorySalesAdminUi/Test/Unit/Model/GetSalableQuantityDataBySkuTest.php index ab65187ef4fb..2a61dca9ff11 100644 --- a/InventorySalesAdminUi/Test/Unit/Model/GetSalableQuantityDataBySkuTest.php +++ b/InventorySalesAdminUi/Test/Unit/Model/GetSalableQuantityDataBySkuTest.php @@ -97,8 +97,13 @@ public function testExecute(): void ->willReturn([2 => 'Stock 2', 3 => 'Stock 3']); $this->getProductSalableQtyMock->expects(self::exactly(2)) ->method('execute') - ->withConsecutive([$sku, 2], [$sku, 3]) - ->willReturnOnConsecutiveCalls(200, 300); + ->willReturnCallback(function ($arg1, $arg2) use ($sku) { + if ($arg1 == $sku && $arg2 == 2) { + return 200; + } elseif ($arg1 == $sku && $arg2 == 3) { + return 300; + } + }); $data = $this->getSalableQuantityDataBySku->execute($sku); $expectedData = [ diff --git a/InventorySalesAdminUi/Test/Unit/Ui/Component/Listing/Column/SalableQuantityTest.php b/InventorySalesAdminUi/Test/Unit/Ui/Component/Listing/Column/SalableQuantityTest.php index 3383f0c4d779..cde1c98bab1e 100644 --- a/InventorySalesAdminUi/Test/Unit/Ui/Component/Listing/Column/SalableQuantityTest.php +++ b/InventorySalesAdminUi/Test/Unit/Ui/Component/Listing/Column/SalableQuantityTest.php @@ -91,12 +91,23 @@ public function testPrepareDataSource(): void $this->isSourceItemManagementAllowedForProductTypeMock->expects(self::exactly(3)) ->method('execute') - ->withConsecutive(['simple'], ['simple'], ['configurable']) - ->willReturnOnConsecutiveCalls(true, true, false); + ->willReturnCallback(function ($arg) { + if ($arg == 'simple') { + return true; + } elseif ($arg == 'configurable') { + return false; + } + }); $this->getAssignedStockIdsBySkuMock->expects(self::exactly(2)) ->method('execute') - ->withConsecutive(['product1'], ['product2']) - ->willReturnOnConsecutiveCalls([2,3], [2,3,4]); + ->willReturnCallback(function ($arg) { + if ($arg == 'product1') { + return [2,3]; + } elseif ($arg == 'product2') { + return [2,3,4]; + } + }); + $this->getSalableQuantityDataBySkuMock->expects(self::once()) ->method('execute') ->with('product1') From be0c9407276145959fa103380d482c2c6d04bd42 Mon Sep 17 00:00:00 2001 From: jayrangnani-gl <142883278+jayrangnani-gl@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:33:59 +0530 Subject: [PATCH 3/8] AC-10912::PHPUnit 10 upgrade Error: Call to undefined method withConsecutive() compatible with phpunit 9 and 10 - Fix unit tests --- .../ResourceModel/GetOrderDataForOrderInFinalStateTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php index 330d1cde574e..4008c4b5c546 100644 --- a/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php +++ b/InventoryReservationCli/Test/Unit/Model/ResourceModel/GetOrderDataForOrderInFinalStateTest.php @@ -87,10 +87,12 @@ public function testExecute(): void ->willReturnArgument(0); $this->resourceConnection->expects($this->exactly(2)) ->method('getConnection') - ->willReturnCallback(function($arg) use ($salesConnectionName, + ->willReturnCallback(function ($arg) use ( + $salesConnectionName, $defaultConnectionName, $salesConnection, - $defaultConnection) { + $defaultConnection + ) { if ($arg == $salesConnectionName) { return $salesConnection; } elseif ($arg == $defaultConnectionName) { From 5daeb262a71df8583fb5aec06b5f898c382d33dc Mon Sep 17 00:00:00 2001 From: Atul-glo35265 Date: Fri, 1 Mar 2024 13:47:50 +0530 Subject: [PATCH 4/8] resolving Integration Test failure --- .../Test/Integration/Source/Validator/CodeValidatorTest.php | 2 +- .../Test/Integration/Source/Validator/NameValidatorTest.php | 2 +- .../Test/Integration/Ui/DataProvider/StockDataProviderTest.php | 2 +- .../GetProductStockStatusBySkuOnDefaultStockTest.php | 2 +- .../StockRegistry/GetProductStockStatusOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetStockStatusOnDefaultStockTest.php | 2 +- .../Test/Integration/Indexer/StockIndexerTest.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Inventory/Test/Integration/Source/Validator/CodeValidatorTest.php b/Inventory/Test/Integration/Source/Validator/CodeValidatorTest.php index 3134bd9a5eb6..a0f6e8048f54 100644 --- a/Inventory/Test/Integration/Source/Validator/CodeValidatorTest.php +++ b/Inventory/Test/Integration/Source/Validator/CodeValidatorTest.php @@ -63,7 +63,7 @@ public function testValidation($sourceCode, $errorCount, $errorStrings) /** * @return array */ - public function dataProvider() + public static function dataProvider() { return [ 'valid code string' => [ diff --git a/Inventory/Test/Integration/Source/Validator/NameValidatorTest.php b/Inventory/Test/Integration/Source/Validator/NameValidatorTest.php index 6c1afb941673..6b1791fe1a58 100644 --- a/Inventory/Test/Integration/Source/Validator/NameValidatorTest.php +++ b/Inventory/Test/Integration/Source/Validator/NameValidatorTest.php @@ -63,7 +63,7 @@ public function testValidation($value, $errorCount, $errorStrings) /** * @return array */ - public function dataProvider() + public static function dataProvider() { return [ 'valid code string' => [ diff --git a/InventoryAdminUi/Test/Integration/Ui/DataProvider/StockDataProviderTest.php b/InventoryAdminUi/Test/Integration/Ui/DataProvider/StockDataProviderTest.php index 336076890196..0865a36e29eb 100644 --- a/InventoryAdminUi/Test/Integration/Ui/DataProvider/StockDataProviderTest.php +++ b/InventoryAdminUi/Test/Integration/Ui/DataProvider/StockDataProviderTest.php @@ -56,7 +56,7 @@ public function testGetDataForListingDataStock($stockName, $assignedSources): vo /** * @return array */ - public function listingDataStockDataProvider(): array + public static function listingDataStockDataProvider(): array { return [[ 'Global-stock', diff --git a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php index 91fe614b0c6d..c3586f3713ba 100644 --- a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php @@ -69,7 +69,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['bundle-product-in-stock', 1], diff --git a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php index 0b6fe322e657..a1391d2aa82a 100644 --- a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php +++ b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php @@ -78,7 +78,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['bundle-product-in-stock', 1], diff --git a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php index 9e03f4a287bf..14a89da354d3 100644 --- a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php @@ -68,7 +68,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['bundle-product-in-stock', 1], diff --git a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php index 6516e72c7092..0b5ea7840f98 100644 --- a/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php +++ b/InventoryBundleProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php @@ -77,7 +77,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['bundle-product-in-stock', 1], diff --git a/InventoryBundleProductIndexer/Test/Integration/Indexer/StockIndexerTest.php b/InventoryBundleProductIndexer/Test/Integration/Indexer/StockIndexerTest.php index a896fdc77502..4b5291af3440 100644 --- a/InventoryBundleProductIndexer/Test/Integration/Indexer/StockIndexerTest.php +++ b/InventoryBundleProductIndexer/Test/Integration/Indexer/StockIndexerTest.php @@ -153,7 +153,7 @@ public function testExecuteList(array $newSourceData, bool $expectedStockStatus) self::assertEquals($expectedStockStatus, (bool) $bundleStockItem[GetStockItemDataInterface::IS_SALABLE]); } - public function executeListDataProvider(): array + public static function executeListDataProvider(): array { return [ [ From 0e05e5169dd8b80d25499b48dda855259a603c64 Mon Sep 17 00:00:00 2001 From: Atul-glo35265 Date: Fri, 1 Mar 2024 14:28:54 +0530 Subject: [PATCH 5/8] resolving Integration Test failure --- .../PreventAssignSourcesToDefaultStockTest.php | 2 +- .../Catalog/Block/Product/ListProduct/SortingTest.php | 2 +- .../GetProductStockStatusBySkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetProductStockStatusBySkuTest.php | 2 +- .../StockRegistry/GetProductStockStatusOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetProductStockStatusTest.php | 2 +- .../Api/StockRegistry/GetStockStatusAsyncReindexTest.php | 2 +- .../StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetStockStatusBySkuTest.php | 2 +- .../Api/StockRegistry/GetStockStatusOnDefaultStockTest.php | 2 +- .../CatalogInventory/Api/StockRegistry/GetStockStatusTest.php | 2 +- .../Helper/Stock/AddInStockFilterToCollectionTest.php | 2 +- .../Helper/Stock/AddStockStatusToProductsTest.php | 2 +- .../Helper/Stock/AssignStatusToProductTest.php | 2 +- .../Stock/Status/AddIsInStockFilterToCollectionTest.php | 2 +- .../Stock/Status/AddSortByStockQtyToCollectionTest.php | 2 +- .../Status/AddStockDataToCollectionOnDefaultStockTest.php | 2 +- .../Stock/Status/AddStockDataToCollectionTest.php | 2 +- .../ResourceModel/Stock/Status/AddStockStatusToSelectTest.php | 2 +- InventoryCatalog/Test/Integration/NegativeMinQtyTest.php | 2 +- .../Test/Unit/Model/PriceIndexUpdateProcessorTest.php | 2 +- .../SetDataToLegacyCatalogInventoryTest.php | 2 +- .../Model/ResourceModel/Product/CollectionPluginTest.php | 2 +- .../SynchronizeLegacyStockAfterDecrementStockPluginTest.php | 2 +- .../Test/Integration/Model/Indexer/FulltextTest.php | 2 +- .../Test/Unit/Model/FullTextIndexUpdateProcessorTest.php | 2 +- .../GetProductStockStatusBuSkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetProductStockStatusBySkuTest.php | 2 +- .../StockRegistry/GetProductStockStatusOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetProductStockStatusTest.php | 2 +- .../StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetStockStatusBySkuTest.php | 2 +- .../Api/StockRegistry/GetStockStatusOnDefaultStockTest.php | 2 +- .../CatalogInventory/Api/StockRegistry/GetStockStatusTest.php | 2 +- .../Test/Integration/Options/OptionsAvailabilityTest.php | 2 +- .../Product/Type/Configurable/IsSalableOptionPluginTest.php | 2 +- .../Backend/Minqty/AllowNegativeMinQtyInConfigPluginTest.php | 2 +- .../GetProductStockStatusBySkuOnDefaultStockTest.php | 2 +- .../StockRegistry/GetProductStockStatusOnDefaultStockTest.php | 2 +- .../StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php | 2 +- .../Api/StockRegistry/GetStockStatusOnDefaultStockTest.php | 2 +- .../Test/Integration/Model/Export/SourcesTest.php | 2 +- .../Test/Integration/Model/Import/SourcesTest.php | 4 ++-- .../Test/Unit/Model/Import/SourceItemConvertTest.php | 2 +- .../Test/Unit/Plugin/Import/SourceItemImporterTest.php | 2 +- .../Integration/Extension/InventorySourceExtensionTest.php | 2 +- .../Test/Integration/GetPickupLocationTest.php | 2 +- .../GetPickupLocations/DistanceFilterOfflineTest.php | 2 +- .../Test/Integration/GetPickupLocations/FiltersTest.php | 2 +- .../Test/Integration/GetPickupLocations/GeneralTest.php | 2 +- .../Test/Unit/Model/ExtractPickupLocationAddressDataTest.php | 2 +- .../Test/Integration/IsOrderReadyForPickupTest.php | 2 +- .../Test/Integration/NotifyOrdersAreReadyForPickupTest.php | 2 +- .../SourceSelection/GetSourceItemQtyAvailableServiceTest.php | 4 ++-- .../Test/Unit/Model/NotifyOrdersAreReadyForPickupTest.php | 2 +- .../Test/Unit/Model/Order/IsFulfillableTest.php | 2 +- 56 files changed, 58 insertions(+), 58 deletions(-) diff --git a/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php b/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php index dbb00b92c48e..339e81288e09 100644 --- a/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php +++ b/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php @@ -87,7 +87,7 @@ public function testAssignSourcesToStockWithWrongParameters( /** * @return array */ - public function dataProviderWrongParameters(): array + public static function dataProviderWrongParameters(): array { $defaultSourceProvider = Bootstrap::getObjectManager()->get(DefaultSourceProviderInterface::class); $defaultStockProvider = Bootstrap::getObjectManager()->get(DefaultStockProviderInterface::class); diff --git a/InventoryCatalog/Test/Integration/Catalog/Block/Product/ListProduct/SortingTest.php b/InventoryCatalog/Test/Integration/Catalog/Block/Product/ListProduct/SortingTest.php index 0b0d2a32a336..e7654430da22 100644 --- a/InventoryCatalog/Test/Integration/Catalog/Block/Product/ListProduct/SortingTest.php +++ b/InventoryCatalog/Test/Integration/Catalog/Block/Product/ListProduct/SortingTest.php @@ -214,7 +214,7 @@ public function testProductListMoveOutOfStockToBottom( * * @return array */ - public function productListWithShowOutOfStockSortOrderDataProvider(): array + public static function productListWithShowOutOfStockSortOrderDataProvider(): array { return [ 'default_order_price_asc' => [ diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php index d156512abc94..0a5319701873 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php @@ -71,7 +71,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['SKU-1', 1], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php index 5d9385b2adc5..138c58ef9024 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php @@ -100,7 +100,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 'SKU-1', 1], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php index 5d4fc18323d2..135260dd1b39 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php @@ -80,7 +80,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['SKU-1', 1], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php index 209bf1e62ab6..795b7df8a33a 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php @@ -109,7 +109,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 'SKU-1', 1], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusAsyncReindexTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusAsyncReindexTest.php index 9db099ab4696..e7edce60e2e2 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusAsyncReindexTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusAsyncReindexTest.php @@ -127,7 +127,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 'SKU-1', 1, 8.5], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php index bbe8aa01d9af..23b69a2488d7 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php @@ -79,7 +79,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['SKU-1', 1, 5.5], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php index 89e4e1cef284..c9588d23e019 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php @@ -106,7 +106,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 'SKU-1', 1, 8.5], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php index 6c444988daa2..0c731132d782 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php @@ -81,7 +81,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['SKU-1', 1, 5.5], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php index 72aad9635fc8..d56593bb46ca 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php @@ -115,7 +115,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 'SKU-1', 1, 8.5], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddInStockFilterToCollectionTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddInStockFilterToCollectionTest.php index 05f93966a431..7ec5f436f78b 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddInStockFilterToCollectionTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddInStockFilterToCollectionTest.php @@ -75,7 +75,7 @@ public function testAddInStockFilterToCollection(string $store, int $expectedSiz /** * @return array */ - public function addInStockFilterToCollectionDataProvider(): array + public static function addInStockFilterToCollectionDataProvider(): array { return [ ['store_for_eu_website', 3], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddStockStatusToProductsTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddStockStatusToProductsTest.php index 6b8d6f56c262..96f7b509d4ff 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddStockStatusToProductsTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AddStockStatusToProductsTest.php @@ -79,7 +79,7 @@ public function testAddStockStatusToProducts(string $storeCode, array $productsD /** * @return array */ - public function addStockStatusToProductsDataProvider(): array + public static function addStockStatusToProductsDataProvider(): array { return [ 'eu_website' => [ diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AssignStatusToProductTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AssignStatusToProductTest.php index 0e3494c27f03..fb523f2b9c84 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AssignStatusToProductTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Helper/Stock/AssignStatusToProductTest.php @@ -109,7 +109,7 @@ public function testAssignStatusToProductIfStatusParameterIsPassed(string $store /** * @return array */ - public function assignStatusToProductDataProvider(): array + public static function assignStatusToProductDataProvider(): array { return [ 'eu_website' => [ diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddIsInStockFilterToCollectionTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddIsInStockFilterToCollectionTest.php index a2299eac967c..c9b4e38f98bf 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddIsInStockFilterToCollectionTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddIsInStockFilterToCollectionTest.php @@ -78,7 +78,7 @@ public function testAddIsInStockFilterToCollection(string $store, int $expectedS /** * @return array */ - public function addIsInStockFilterToCollectionDataProvider(): array + public static function addIsInStockFilterToCollectionDataProvider(): array { return [ ['store_for_eu_website', 3], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddSortByStockQtyToCollectionTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddSortByStockQtyToCollectionTest.php index d7211646ce9c..939572566e1c 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddSortByStockQtyToCollectionTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddSortByStockQtyToCollectionTest.php @@ -47,7 +47,7 @@ public function testExecute(string $storeCode, string $dir, array $expectedOrder /** * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionOnDefaultStockTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionOnDefaultStockTest.php index 7294cbf05c59..8bdcbdce4268 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionOnDefaultStockTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionOnDefaultStockTest.php @@ -50,7 +50,7 @@ public function testAddStockDataToCollection(int $expectedSize, bool $isFilterIn /** * @return array */ - public function addStockDataToCollectionDataProvider(): array + public static function addStockDataToCollectionDataProvider(): array { return [ [4, true], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionTest.php index 128bbd24190c..0caaae6fb800 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockDataToCollectionTest.php @@ -79,7 +79,7 @@ public function testAddStockDataToCollection(string $store, int $expectedSize, b /** * @return array */ - public function addStockDataToCollectionDataProvider(): array + public static function addStockDataToCollectionDataProvider(): array { return [ ['store_for_eu_website', 3, true], diff --git a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockStatusToSelectTest.php b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockStatusToSelectTest.php index 786bae1a5ca8..71a9ffcff22f 100644 --- a/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockStatusToSelectTest.php +++ b/InventoryCatalog/Test/Integration/CatalogInventory/Model/ResourceModel/Stock/Status/AddStockStatusToSelectTest.php @@ -81,7 +81,7 @@ public function testAddStockStatusToSelect( /** * @return array */ - public function addStockStatusToSelectDataProvider(): array + public static function addStockStatusToSelectDataProvider(): array { return [ ['eu_website', 3, 3], diff --git a/InventoryCatalog/Test/Integration/NegativeMinQtyTest.php b/InventoryCatalog/Test/Integration/NegativeMinQtyTest.php index 1fab6411e884..9f7bf56144a3 100644 --- a/InventoryCatalog/Test/Integration/NegativeMinQtyTest.php +++ b/InventoryCatalog/Test/Integration/NegativeMinQtyTest.php @@ -106,7 +106,7 @@ public function testIsProductSalableForRequestedQtyWithBackordersEnabledAtProduc * * @return array */ - public function isProductSalableForRequestedQtyWithBackordersEnabledAtProductLevelDataProvider(): array + public static function isProductSalableForRequestedQtyWithBackordersEnabledAtProductLevelDataProvider(): array { return [ 'salable_qty' => ['SKU-1', 10, -4.5, 13, true], diff --git a/InventoryCatalog/Test/Unit/Model/PriceIndexUpdateProcessorTest.php b/InventoryCatalog/Test/Unit/Model/PriceIndexUpdateProcessorTest.php index cec8607fb689..4abe8349a0fb 100644 --- a/InventoryCatalog/Test/Unit/Model/PriceIndexUpdateProcessorTest.php +++ b/InventoryCatalog/Test/Unit/Model/PriceIndexUpdateProcessorTest.php @@ -75,7 +75,7 @@ public function testProcess( /** * @return array */ - public function processDataProvider(): array + public static function processDataProvider(): array { return [ [[1], ['sku1' => [1 => true]], ['sku1' => [1 => true]], [], 0], diff --git a/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php b/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php index d12105801cf9..fca693904f3e 100644 --- a/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php +++ b/InventoryCatalog/Test/Unit/Model/SourceItemsSaveSynchronization/SetDataToLegacyCatalogInventoryTest.php @@ -164,7 +164,7 @@ function (callable $callback) { /** * @return array */ - public function getDataProvider(): array + public static function getDataProvider(): array { return [ [201, 'COC002-Red-M', 10, SourceItemInterface::STATUS_IN_STOCK], diff --git a/InventoryCatalog/Test/Unit/Plugin/Catalog/Model/ResourceModel/Product/CollectionPluginTest.php b/InventoryCatalog/Test/Unit/Plugin/Catalog/Model/ResourceModel/Product/CollectionPluginTest.php index 0ec200f19710..edc81570fdb5 100644 --- a/InventoryCatalog/Test/Unit/Plugin/Catalog/Model/ResourceModel/Product/CollectionPluginTest.php +++ b/InventoryCatalog/Test/Unit/Plugin/Catalog/Model/ResourceModel/Product/CollectionPluginTest.php @@ -140,7 +140,7 @@ public function testBeforeSetOrderWhenOutOfStockIsEnabled( * * @return array[] */ - public function dataProviderForAutomaticSorting(): array + public static function dataProviderForAutomaticSorting(): array { $attribute = 'is_out_of_stock'; $dir = 'DESC'; diff --git a/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php b/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php index 25def6e0be1f..850e83782c06 100644 --- a/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php +++ b/InventoryCatalog/Test/Unit/Plugin/InventoryApi/SynchronizeLegacyStockAfterDecrementStockPluginTest.php @@ -225,7 +225,7 @@ public function testAfterExecute($sourceCode, $productId, $itemSku, $qty, $stock /** * @return array[] */ - public function getDataProvider(): array + public static function getDataProvider(): array { return [ ['default', 1, 'SKU-1', 1.0, 1], diff --git a/InventoryCatalogSearch/Test/Integration/Model/Indexer/FulltextTest.php b/InventoryCatalogSearch/Test/Integration/Model/Indexer/FulltextTest.php index b01e828c4fb4..ab9a2285f980 100644 --- a/InventoryCatalogSearch/Test/Integration/Model/Indexer/FulltextTest.php +++ b/InventoryCatalogSearch/Test/Integration/Model/Indexer/FulltextTest.php @@ -218,7 +218,7 @@ public function testSearchPerStock(string $queryText, string $store, int $expect /** * @return array */ - public function searchPerStockDataProvider(): array + public static function searchPerStockDataProvider(): array { return [ ['Orange', 'store_for_eu_website', 1], diff --git a/InventoryCatalogSearch/Test/Unit/Model/FullTextIndexUpdateProcessorTest.php b/InventoryCatalogSearch/Test/Unit/Model/FullTextIndexUpdateProcessorTest.php index 63de65897d6f..f055d68fbed7 100644 --- a/InventoryCatalogSearch/Test/Unit/Model/FullTextIndexUpdateProcessorTest.php +++ b/InventoryCatalogSearch/Test/Unit/Model/FullTextIndexUpdateProcessorTest.php @@ -75,7 +75,7 @@ public function testAroundExecuteList( /** * @return array */ - public function processDataProvider(): array + public static function processDataProvider(): array { return [ [[1], ['sku1' => [1 => true]], ['sku1' => [1 => true]], [], 0], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBuSkuOnDefaultStockTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBuSkuOnDefaultStockTest.php index 61ef3a077d34..3604d3fc51b6 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBuSkuOnDefaultStockTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBuSkuOnDefaultStockTest.php @@ -76,7 +76,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['configurable_in_stock', 1], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php index 9b7c5d564f4c..8a933da8e289 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuTest.php @@ -100,7 +100,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 0], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php index 55fccdd7bfd1..c9362c198b22 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php @@ -78,7 +78,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['configurable_in_stock', 1], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php index 0c88383536c7..fea5181500d4 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusTest.php @@ -109,7 +109,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 0], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php index 541a999e9760..cafbab137af0 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php @@ -71,7 +71,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['configurable_in_stock', 1], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php index b1297cad5de8..2a11cbbabbdb 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuTest.php @@ -106,7 +106,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 0, 0], // Qty not supported for complex products diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php index 8f9c53cd8f97..355a6dd1a7e6 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php @@ -77,7 +77,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['configurable_in_stock', 1], diff --git a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php index 5eeb868920eb..45c08bac37f4 100644 --- a/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php +++ b/InventoryConfigurableProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusTest.php @@ -115,7 +115,7 @@ public function testGetStatusIfScopeIdParameterIsPassed( /** * @return array */ - public function getStatusDataProvider(): array + public static function getStatusDataProvider(): array { return [ ['store_for_eu_website', 0, 0], // Qty not supported for complex products diff --git a/InventoryConfigurableProduct/Test/Integration/Options/OptionsAvailabilityTest.php b/InventoryConfigurableProduct/Test/Integration/Options/OptionsAvailabilityTest.php index 4178a718d431..727609888cde 100644 --- a/InventoryConfigurableProduct/Test/Integration/Options/OptionsAvailabilityTest.php +++ b/InventoryConfigurableProduct/Test/Integration/Options/OptionsAvailabilityTest.php @@ -122,7 +122,7 @@ public function testGetSalableOptionsWithShowOutOfStock(): void /** * @return array */ - public function getSalableOptionsDataProvider() + public static function getSalableOptionsDataProvider() { return [ [ diff --git a/InventoryConfigurableProduct/Test/Unit/Plugin/Model/Product/Type/Configurable/IsSalableOptionPluginTest.php b/InventoryConfigurableProduct/Test/Unit/Plugin/Model/Product/Type/Configurable/IsSalableOptionPluginTest.php index 0295c80c7f31..a127ac01118a 100644 --- a/InventoryConfigurableProduct/Test/Unit/Plugin/Model/Product/Type/Configurable/IsSalableOptionPluginTest.php +++ b/InventoryConfigurableProduct/Test/Unit/Plugin/Model/Product/Type/Configurable/IsSalableOptionPluginTest.php @@ -121,7 +121,7 @@ public function testSomeProductsAreNotSalable(bool $isShowOutOfStock, int $expec } } - public function productSalabilityDataProvider(): array + public static function productSalabilityDataProvider(): array { return [ 'Hide Out Of Stock' => [false, 2], diff --git a/InventoryConfiguration/Test/Integration/Plugin/CatalogInventory/Model/System/Config/Backend/Minqty/AllowNegativeMinQtyInConfigPluginTest.php b/InventoryConfiguration/Test/Integration/Plugin/CatalogInventory/Model/System/Config/Backend/Minqty/AllowNegativeMinQtyInConfigPluginTest.php index 9b23144c9542..57b0ad05c817 100644 --- a/InventoryConfiguration/Test/Integration/Plugin/CatalogInventory/Model/System/Config/Backend/Minqty/AllowNegativeMinQtyInConfigPluginTest.php +++ b/InventoryConfiguration/Test/Integration/Plugin/CatalogInventory/Model/System/Config/Backend/Minqty/AllowNegativeMinQtyInConfigPluginTest.php @@ -71,7 +71,7 @@ public function testBeforeSave(string $value, string $expectedMinQty): void * * @return array */ - public function beforeSaveDataProvider(): array + public static function beforeSaveDataProvider(): array { return [ 'min_qty_positive' => [ diff --git a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php index 6b6ff2aa5da6..b254ede097fd 100644 --- a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusBySkuOnDefaultStockTest.php @@ -69,7 +69,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['grouped_in_stock', 1], diff --git a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php index 733b50f19071..bcd1bf41d762 100644 --- a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php +++ b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetProductStockStatusOnDefaultStockTest.php @@ -78,7 +78,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['grouped_in_stock', 1], diff --git a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php index 8ba616e062c9..b153506cb6b2 100644 --- a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php +++ b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusBySkuOnDefaultStockTest.php @@ -68,7 +68,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['grouped_in_stock', 1], diff --git a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php index 68c6aa536954..fc540aa8e9e4 100644 --- a/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php +++ b/InventoryGroupedProduct/Test/Integration/CatalogInventory/Api/StockRegistry/GetStockStatusOnDefaultStockTest.php @@ -77,7 +77,7 @@ public function testGetStatusIfScopeIdParameterIsPassed(string $sku, int $status /** * @return array */ - public function getStockDataProvider(): array + public static function getStockDataProvider(): array { return [ ['grouped_in_stock', 1], diff --git a/InventoryImportExport/Test/Integration/Model/Export/SourcesTest.php b/InventoryImportExport/Test/Integration/Model/Export/SourcesTest.php index 46f56d55ab8b..95fd23cbe511 100644 --- a/InventoryImportExport/Test/Integration/Model/Export/SourcesTest.php +++ b/InventoryImportExport/Test/Integration/Model/Export/SourcesTest.php @@ -196,7 +196,7 @@ public function testExportFilteredWithoutStatusColumn() ); } - public function exportWithWebsiteFilterDataProvider() + public static function exportWithWebsiteFilterDataProvider() { return [ [0, 'export_empty.csv'], diff --git a/InventoryImportExport/Test/Integration/Model/Import/SourcesTest.php b/InventoryImportExport/Test/Integration/Model/Import/SourcesTest.php index bf1d3bdcbca6..313a4be67d8f 100755 --- a/InventoryImportExport/Test/Integration/Model/Import/SourcesTest.php +++ b/InventoryImportExport/Test/Integration/Model/Import/SourcesTest.php @@ -336,7 +336,7 @@ public function testImportSourceWithAppendBehavior() * * @return array */ - public function getSampleFileExpectedData(): array + public static function getSampleFileExpectedData(): array { return [ [ @@ -440,7 +440,7 @@ public function testDeleteWithSampleFile(array $expectedData): void * * @return array */ - public function getSampleFileExpectedDataDeleteBehavior(): array + public static function getSampleFileExpectedDataDeleteBehavior(): array { return [ [ diff --git a/InventoryImportExport/Test/Unit/Model/Import/SourceItemConvertTest.php b/InventoryImportExport/Test/Unit/Model/Import/SourceItemConvertTest.php index fc12501848e6..e2075aa8d5b0 100644 --- a/InventoryImportExport/Test/Unit/Model/Import/SourceItemConvertTest.php +++ b/InventoryImportExport/Test/Unit/Model/Import/SourceItemConvertTest.php @@ -65,7 +65,7 @@ public function testConvert(array $bunch, int $expectedStatus) : void * * @return array */ - public function dataProviderConvert(): array + public static function dataProviderConvert(): array { return [ [ diff --git a/InventoryImportExport/Test/Unit/Plugin/Import/SourceItemImporterTest.php b/InventoryImportExport/Test/Unit/Plugin/Import/SourceItemImporterTest.php index 93bb7e53d385..d2150d172e1f 100644 --- a/InventoryImportExport/Test/Unit/Plugin/Import/SourceItemImporterTest.php +++ b/InventoryImportExport/Test/Unit/Plugin/Import/SourceItemImporterTest.php @@ -232,7 +232,7 @@ private function saveSkusHavingDefaultSourceMock(string $sku): void * * @return array[] */ - public function sourceItemDataProvider(): array + public static function sourceItemDataProvider(): array { return [ 'non-default existing source code with 0 quantity for existing product' => [ diff --git a/InventoryInStorePickup/Test/Integration/Extension/InventorySourceExtensionTest.php b/InventoryInStorePickup/Test/Integration/Extension/InventorySourceExtensionTest.php index c7b2fe8024f0..b1048862e13a 100644 --- a/InventoryInStorePickup/Test/Integration/Extension/InventorySourceExtensionTest.php +++ b/InventoryInStorePickup/Test/Integration/Extension/InventorySourceExtensionTest.php @@ -155,7 +155,7 @@ public function testGetSourceWithPickupLocationExtensionAfterSave(array $data, s * * @return array */ - public function dataProvider(): array + public static function dataProvider(): array { return [ [ /* Data set #0. Default Source. */ diff --git a/InventoryInStorePickup/Test/Integration/GetPickupLocationTest.php b/InventoryInStorePickup/Test/Integration/GetPickupLocationTest.php index 0a086407ba39..4560f7ca3c5f 100644 --- a/InventoryInStorePickup/Test/Integration/GetPickupLocationTest.php +++ b/InventoryInStorePickup/Test/Integration/GetPickupLocationTest.php @@ -82,7 +82,7 @@ public function testExecute( * * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ diff --git a/InventoryInStorePickup/Test/Integration/GetPickupLocations/DistanceFilterOfflineTest.php b/InventoryInStorePickup/Test/Integration/GetPickupLocations/DistanceFilterOfflineTest.php index 698824767991..87dbf06d12e9 100644 --- a/InventoryInStorePickup/Test/Integration/GetPickupLocations/DistanceFilterOfflineTest.php +++ b/InventoryInStorePickup/Test/Integration/GetPickupLocations/DistanceFilterOfflineTest.php @@ -135,7 +135,7 @@ public function testExecute( * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ /* Data set #0 */ diff --git a/InventoryInStorePickup/Test/Integration/GetPickupLocations/FiltersTest.php b/InventoryInStorePickup/Test/Integration/GetPickupLocations/FiltersTest.php index 8adc083334e5..860fdba02083 100644 --- a/InventoryInStorePickup/Test/Integration/GetPickupLocations/FiltersTest.php +++ b/InventoryInStorePickup/Test/Integration/GetPickupLocations/FiltersTest.php @@ -136,7 +136,7 @@ private function setFilter(string $field, array $condition): void * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ /* Data set #0 */ diff --git a/InventoryInStorePickup/Test/Integration/GetPickupLocations/GeneralTest.php b/InventoryInStorePickup/Test/Integration/GetPickupLocations/GeneralTest.php index e15a12774d59..6918157c8e1e 100644 --- a/InventoryInStorePickup/Test/Integration/GetPickupLocations/GeneralTest.php +++ b/InventoryInStorePickup/Test/Integration/GetPickupLocations/GeneralTest.php @@ -121,7 +121,7 @@ public function testExecute( * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ /* Data set #0 */ diff --git a/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php b/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php index 439cf63f1319..2d1f1fd218d9 100644 --- a/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php +++ b/InventoryInStorePickup/Test/Unit/Model/ExtractPickupLocationAddressDataTest.php @@ -104,7 +104,7 @@ public function testExecute(string $translatedRegionName, string $expectedRegion * * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ [ diff --git a/InventoryInStorePickupSales/Test/Integration/IsOrderReadyForPickupTest.php b/InventoryInStorePickupSales/Test/Integration/IsOrderReadyForPickupTest.php index fcbc72173be3..ed3b5dbb045d 100644 --- a/InventoryInStorePickupSales/Test/Integration/IsOrderReadyForPickupTest.php +++ b/InventoryInStorePickupSales/Test/Integration/IsOrderReadyForPickupTest.php @@ -127,7 +127,7 @@ private function setPickupLocation(OrderInterface $createdOrder, string $sourceI * * @return array */ - public function dataProvider(): array + public static function dataProvider(): array { return [ ['eu-1', false], diff --git a/InventoryInStorePickupSales/Test/Integration/NotifyOrdersAreReadyForPickupTest.php b/InventoryInStorePickupSales/Test/Integration/NotifyOrdersAreReadyForPickupTest.php index 241736513fa8..7c6474da264a 100644 --- a/InventoryInStorePickupSales/Test/Integration/NotifyOrdersAreReadyForPickupTest.php +++ b/InventoryInStorePickupSales/Test/Integration/NotifyOrdersAreReadyForPickupTest.php @@ -213,7 +213,7 @@ private function setPickupLocation(OrderInterface $createdOrder, string $sourceI * * @return array */ - public function dataProvider(): array + public static function dataProvider(): array { return [ ['eu-1', 'The order is not ready for pickup'], diff --git a/InventoryInStorePickupSales/Test/Integration/SourceSelection/GetSourceItemQtyAvailableServiceTest.php b/InventoryInStorePickupSales/Test/Integration/SourceSelection/GetSourceItemQtyAvailableServiceTest.php index 7f11a1e43e2a..f2bdf579adba 100644 --- a/InventoryInStorePickupSales/Test/Integration/SourceSelection/GetSourceItemQtyAvailableServiceTest.php +++ b/InventoryInStorePickupSales/Test/Integration/SourceSelection/GetSourceItemQtyAvailableServiceTest.php @@ -166,7 +166,7 @@ private function getSourceItems(string $sourceCodes, string $sku): array /** * @return array */ - public function singleStorePickupOrderProvider(): array + public static function singleStorePickupOrderProvider(): array { return [ ['eu-1', 'SKU-1', 2.0], //3.5 reserved @@ -182,7 +182,7 @@ public function singleStorePickupOrderProvider(): array /** * @return array */ - public function multipleStorePickupOrdersProvider(): array + public static function multipleStorePickupOrdersProvider(): array { return [ ['eu-1', 'SKU-1', 1.0], //3.5 + 1.0 reserved diff --git a/InventoryInStorePickupSales/Test/Unit/Model/NotifyOrdersAreReadyForPickupTest.php b/InventoryInStorePickupSales/Test/Unit/Model/NotifyOrdersAreReadyForPickupTest.php index 122caf3714f4..db007868ebe1 100644 --- a/InventoryInStorePickupSales/Test/Unit/Model/NotifyOrdersAreReadyForPickupTest.php +++ b/InventoryInStorePickupSales/Test/Unit/Model/NotifyOrdersAreReadyForPickupTest.php @@ -166,7 +166,7 @@ public function testExecuteForEmailNotify($exception): void /** * @return array */ - public function executeMethodEmailCheck(): array + public static function executeMethodEmailCheck(): array { return [ ['with_exception' => true], diff --git a/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php b/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php index 1451889b6b96..7185431a9b8e 100644 --- a/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php +++ b/InventoryInStorePickupSales/Test/Unit/Model/Order/IsFulfillableTest.php @@ -290,7 +290,7 @@ public function testExecute( /** * @return array */ - public function dataProvider(): array + public static function dataProvider(): array { return [ [false, true, 1, 0, true], From 27783464abf6e8a57116d8fc23f96383d369edb7 Mon Sep 17 00:00:00 2001 From: Nishant Rana Date: Fri, 1 Mar 2024 18:45:23 +0530 Subject: [PATCH 6/8] Webapi test fixes --- InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php | 6 +++--- .../Test/Api/SourceRepository/CarrierLinkManagementTest.php | 2 +- InventoryApi/Test/Api/SourceRepository/ValidationTest.php | 6 +++--- InventoryApi/Test/Api/StockRepository/GetListTest.php | 2 +- InventoryApi/Test/Api/StockRepository/ValidationTest.php | 4 ++-- .../Test/Api/ExportStockSalableQtyTest.php | 2 +- .../Test/Api/AreProductsSalableForRequestedQtyTest.php | 2 +- InventorySalesApi/Test/Api/AreProductsSalableTest.php | 2 +- .../Test/Api/GetProductSalableQuantityTest.php | 2 +- .../Test/Api/IsProductSalableForRequestedQtyTest.php | 2 +- InventorySalesApi/Test/Api/IsProductSalableTest.php | 2 +- .../Test/Api/StockRepository/SalesChannelManagementTest.php | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php b/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php index e3799dfecbe3..0c54a741453c 100644 --- a/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php +++ b/InventoryApi/Test/Api/SourceItemsSave/ValidationTest.php @@ -60,7 +60,7 @@ public function testCreateWithMissedRequiredFields(string $field, array $expecte /** * @return array */ - public function dataProviderRequiredFields(): array + public static function dataProviderRequiredFields(): array { return [ 'without_' . SourceItemInterface::SKU => [ @@ -152,7 +152,7 @@ public function testFailedValidationOnCreate(string $field, $value, array $expec * @return array * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function failedValidationDataProvider(): array + public static function failedValidationDataProvider(): array { if (TESTS_WEB_API_ADAPTER === self::ADAPTER_SOAP) { $nonExistedSourceCodeError = [ @@ -357,7 +357,7 @@ public function testFailedValidationOnCreateRelatedOnlyForRest(string $field, $v /** * @return array */ - public function failedValidationRelatedOnlyForRestDataProvider(): array + public static function failedValidationRelatedOnlyForRestDataProvider(): array { return [ 'empty_' . SourceItemInterface::QUANTITY => [ diff --git a/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php b/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php index 75c4bd6c3033..d6c90bcc8798 100644 --- a/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php +++ b/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php @@ -54,7 +54,7 @@ public function testCarrierLinksManagement(array $carrierLinks) /** * @return array */ - public function dataProviderCarrierLinks(): array + public static function dataProviderCarrierLinks(): array { return [ 'add_carrier_new_links' => [ diff --git a/InventoryApi/Test/Api/SourceRepository/ValidationTest.php b/InventoryApi/Test/Api/SourceRepository/ValidationTest.php index d37682ad90b9..3b93584e1911 100644 --- a/InventoryApi/Test/Api/SourceRepository/ValidationTest.php +++ b/InventoryApi/Test/Api/SourceRepository/ValidationTest.php @@ -58,7 +58,7 @@ public function testCreateWithMissedRequiredFields(string $field, array $expecte /** * @return array */ - public function dataProviderRequiredFields(): array + public static function dataProviderRequiredFields(): array { return [ 'without_' . SourceInterface::NAME => [ @@ -162,7 +162,7 @@ public function testFailedValidationOnUpdate(string $field, $value, array $expec * @return array * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function failedValidationDataProvider(): array + public static function failedValidationDataProvider(): array { return [ 'null_' . SourceInterface::SOURCE_CODE => [ @@ -375,7 +375,7 @@ public function failedValidationDataProvider(): array * @return array * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function failedValidationUpdateDataProvider(): array + public static function failedValidationUpdateDataProvider(): array { return [ 'null_' . SourceInterface::NAME => [ diff --git a/InventoryApi/Test/Api/StockRepository/GetListTest.php b/InventoryApi/Test/Api/StockRepository/GetListTest.php index 2fc305ed324b..f2473e5ae05b 100644 --- a/InventoryApi/Test/Api/StockRepository/GetListTest.php +++ b/InventoryApi/Test/Api/StockRepository/GetListTest.php @@ -55,7 +55,7 @@ public function testGetList(array $searchCriteria, int $expectedTotalCount, arra /** * @return array */ - public function dataProviderGetList(): array + public static function dataProviderGetList(): array { return [ 'filtering' => [ diff --git a/InventoryApi/Test/Api/StockRepository/ValidationTest.php b/InventoryApi/Test/Api/StockRepository/ValidationTest.php index d357fd7cb1a6..168088873d30 100644 --- a/InventoryApi/Test/Api/StockRepository/ValidationTest.php +++ b/InventoryApi/Test/Api/StockRepository/ValidationTest.php @@ -56,7 +56,7 @@ public function testCreateWithMissedRequiredFields(string $field, array $expecte /** * @return array */ - public function dataProviderRequiredFields(): array + public static function dataProviderRequiredFields(): array { return [ 'without_' . StockInterface::NAME => [ @@ -167,7 +167,7 @@ public function testFailedValidationOnUpdate(string $field, $value, array $expec /** * @return array */ - public function failedValidationDataProvider(): array + public static function failedValidationDataProvider(): array { return [ 'empty_' . StockInterface::NAME => [ diff --git a/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php b/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php index 6949ae3b595e..e8403e57ed09 100644 --- a/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php +++ b/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php @@ -217,7 +217,7 @@ public function testExportSimpleProductTypesWithReservationsAdditionalWebsiteAdd * * @return array */ - public function simpleProductTypesDataProvider() + public static function simpleProductTypesDataProvider() { return [ [ diff --git a/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php b/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php index 782cf918b598..f3ada5ea0429 100644 --- a/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php +++ b/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php @@ -77,7 +77,7 @@ public function testProductSalableForRequestedQtyAndStock( * * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ ['SKU-1', 10, 1, true, []], diff --git a/InventorySalesApi/Test/Api/AreProductsSalableTest.php b/InventorySalesApi/Test/Api/AreProductsSalableTest.php index e632d76c195d..4415a7dff079 100644 --- a/InventorySalesApi/Test/Api/AreProductsSalableTest.php +++ b/InventorySalesApi/Test/Api/AreProductsSalableTest.php @@ -68,7 +68,7 @@ public function testProductSaleabilityOnDifferentStocks( * * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ ['SKU-1', 10, true], diff --git a/InventorySalesApi/Test/Api/GetProductSalableQuantityTest.php b/InventorySalesApi/Test/Api/GetProductSalableQuantityTest.php index 023070fbec06..021b2e5cbb6e 100644 --- a/InventorySalesApi/Test/Api/GetProductSalableQuantityTest.php +++ b/InventorySalesApi/Test/Api/GetProductSalableQuantityTest.php @@ -64,7 +64,7 @@ public function testGetSalableQuantity( /** * @return array */ - public function getSalableQuantityDataProvider(): array + public static function getSalableQuantityDataProvider(): array { return [ ['SKU-1', 10, 8.5], diff --git a/InventorySalesApi/Test/Api/IsProductSalableForRequestedQtyTest.php b/InventorySalesApi/Test/Api/IsProductSalableForRequestedQtyTest.php index b8c9991ea151..2efd323d8c70 100644 --- a/InventorySalesApi/Test/Api/IsProductSalableForRequestedQtyTest.php +++ b/InventorySalesApi/Test/Api/IsProductSalableForRequestedQtyTest.php @@ -18,7 +18,7 @@ class IsProductSalableForRequestedQtyTest extends WebapiAbstract /** * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ ['SKU-1', 10, 1, true], diff --git a/InventorySalesApi/Test/Api/IsProductSalableTest.php b/InventorySalesApi/Test/Api/IsProductSalableTest.php index c88b87295b5c..32f4b9c78fe2 100644 --- a/InventorySalesApi/Test/Api/IsProductSalableTest.php +++ b/InventorySalesApi/Test/Api/IsProductSalableTest.php @@ -21,7 +21,7 @@ class IsProductSalableTest extends WebapiAbstract /** * @return array */ - public function executeDataProvider(): array + public static function executeDataProvider(): array { return [ ['SKU-1', 10, true], diff --git a/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php b/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php index a34cf46460c3..40d682cb572a 100644 --- a/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php +++ b/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php @@ -101,7 +101,7 @@ public function testValidateDeleteSalesChannelFromStock(array $salesChannels, ar /** * @return array */ - public function deleteSalesChannelDataProvider(): array + public static function deleteSalesChannelDataProvider(): array { return [ 'one_channel_delete' . SalesChannelInterface::TYPE => [ @@ -176,7 +176,7 @@ public function testFailedValidationSalesChannelsAssignment(array $salesChannels /** * @return array */ - public function dataProviderSalesChannelsAssignment(): array + public static function dataProviderSalesChannelsAssignment(): array { return [ 'not_given_' . SalesChannelInterface::TYPE => [ From 4e039cdf2cb9ee6a594b8704334d85920710a4ba Mon Sep 17 00:00:00 2001 From: Nishant Rana Date: Fri, 3 May 2024 16:03:13 +0530 Subject: [PATCH 7/8] PHPUnit 10 static test fixes --- .../Test/Api/SourceRepository/CarrierLinkManagementTest.php | 4 ++-- InventoryApi/Test/Api/SourceRepository/ValidationTest.php | 4 ++-- InventoryApi/Test/Api/StockRepository/GetListTest.php | 4 ++-- InventoryApi/Test/Api/StockRepository/ValidationTest.php | 4 ++-- .../PreventAssignSourcesToDefaultStockTest.php | 4 ++-- .../Test/Api/ExportStockSalableQtyTest.php | 4 ++-- InventorySalesApi/Test/Api/AreProductsSalableTest.php | 6 +++--- .../Test/Api/StockRepository/SalesChannelManagementTest.php | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php b/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php index d6c90bcc8798..482b7e0c2a64 100644 --- a/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php +++ b/InventoryApi/Test/Api/SourceRepository/CarrierLinkManagementTest.php @@ -17,8 +17,8 @@ class CarrierLinkManagementTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/sources'; - const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; + private const RESOURCE_PATH = '/V1/inventory/sources'; + private const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ /** diff --git a/InventoryApi/Test/Api/SourceRepository/ValidationTest.php b/InventoryApi/Test/Api/SourceRepository/ValidationTest.php index 3b93584e1911..626342adf1ae 100644 --- a/InventoryApi/Test/Api/SourceRepository/ValidationTest.php +++ b/InventoryApi/Test/Api/SourceRepository/ValidationTest.php @@ -17,8 +17,8 @@ class ValidationTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/sources'; - const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; + private const RESOURCE_PATH = '/V1/inventory/sources'; + private const SERVICE_NAME = 'inventoryApiSourceRepositoryV1'; /**#@-*/ /** diff --git a/InventoryApi/Test/Api/StockRepository/GetListTest.php b/InventoryApi/Test/Api/StockRepository/GetListTest.php index f2473e5ae05b..d038f9692649 100644 --- a/InventoryApi/Test/Api/StockRepository/GetListTest.php +++ b/InventoryApi/Test/Api/StockRepository/GetListTest.php @@ -19,8 +19,8 @@ class GetListTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stocks'; - const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; + private const RESOURCE_PATH = '/V1/inventory/stocks'; + private const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ /** diff --git a/InventoryApi/Test/Api/StockRepository/ValidationTest.php b/InventoryApi/Test/Api/StockRepository/ValidationTest.php index 168088873d30..4b1e81ad6b1d 100644 --- a/InventoryApi/Test/Api/StockRepository/ValidationTest.php +++ b/InventoryApi/Test/Api/StockRepository/ValidationTest.php @@ -18,8 +18,8 @@ class ValidationTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stocks'; - const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; + private const RESOURCE_PATH = '/V1/inventory/stocks'; + private const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ /** diff --git a/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php b/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php index 339e81288e09..0ac67f512fe3 100644 --- a/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php +++ b/InventoryCatalog/Test/Api/StockSourceLink/PreventAssignSourcesToDefaultStockTest.php @@ -19,8 +19,8 @@ class PreventAssignSourcesToDefaultStockTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH_ASSIGN_SOURCES_TO_STOCK = '/V1/inventory/stock-source-links'; - const SERVICE_NAME_ASSIGN_SOURCES_TO_STOCK = 'inventoryApiStockSourceLinksSaveV1'; + private const RESOURCE_PATH_ASSIGN_SOURCES_TO_STOCK = '/V1/inventory/stock-source-links'; + private const SERVICE_NAME_ASSIGN_SOURCES_TO_STOCK = 'inventoryApiStockSourceLinksSaveV1'; /**#@-*/ /** diff --git a/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php b/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php index e8403e57ed09..6626e541dc03 100644 --- a/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php +++ b/InventoryExportStockApi/Test/Api/ExportStockSalableQtyTest.php @@ -22,8 +22,8 @@ */ class ExportStockSalableQtyTest extends OrderPlacementBase { - const API_PATH = '/V1/inventory/export-stock-salable-qty'; - const SERVICE_NAME = 'inventoryExportStockApiExportStockSalableQtyV1'; + private const API_PATH = '/V1/inventory/export-stock-salable-qty'; + public const SERVICE_NAME = 'inventoryExportStockApiExportStockSalableQtyV1'; /** * Verify salable qty export with reservations simple product types - default stock, default website. diff --git a/InventorySalesApi/Test/Api/AreProductsSalableTest.php b/InventorySalesApi/Test/Api/AreProductsSalableTest.php index 4415a7dff079..98e33d3b3e3a 100644 --- a/InventorySalesApi/Test/Api/AreProductsSalableTest.php +++ b/InventorySalesApi/Test/Api/AreProductsSalableTest.php @@ -15,9 +15,9 @@ */ class AreProductsSalableTest extends WebapiAbstract { - const API_PATH = '/V1/inventory/are-products-salable'; - const SERVICE_NAME = 'inventorySalesApiAreProductsSalableV1'; - const SERVICE_VERSION = 'V1'; + private const API_PATH = '/V1/inventory/are-products-salable'; + private const SERVICE_NAME = 'inventorySalesApiAreProductsSalableV1'; + private const SERVICE_VERSION = 'V1'; /** * Verify product salable status for different stocks. diff --git a/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php b/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php index 40d682cb572a..c356f6ffe841 100644 --- a/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php +++ b/InventorySalesApi/Test/Api/StockRepository/SalesChannelManagementTest.php @@ -19,8 +19,8 @@ class SalesChannelManagementTest extends WebapiAbstract /**#@+ * Service constants */ - const RESOURCE_PATH = '/V1/inventory/stocks'; - const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; + private const RESOURCE_PATH = '/V1/inventory/stocks'; + private const SERVICE_NAME = 'inventoryApiStockRepositoryV1'; /**#@-*/ /** From 64919fec67bbe6f0e71dc8a8a629dec3a95f74dd Mon Sep 17 00:00:00 2001 From: Nishant Rana Date: Tue, 7 May 2024 00:43:39 +0530 Subject: [PATCH 8/8] PHPUnit 10 Static test fixes --- .../Test/Api/AreProductsSalableForRequestedQtyTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php b/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php index f3ada5ea0429..3ef97556c372 100644 --- a/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php +++ b/InventorySalesApi/Test/Api/AreProductsSalableForRequestedQtyTest.php @@ -15,9 +15,9 @@ */ class AreProductsSalableForRequestedQtyTest extends WebapiAbstract { - const API_PATH = '/V1/inventory/are-product-salable-for-requested-qty'; - const SERVICE_NAME = 'inventorySalesApiAreProductsSalableForRequestedQtyV1'; - const SERVICE_VERSION = 'V1'; + private const API_PATH = '/V1/inventory/are-product-salable-for-requested-qty'; + private const SERVICE_NAME = 'inventorySalesApiAreProductsSalableForRequestedQtyV1'; + private const SERVICE_VERSION = 'V1'; /** * Verify product salable status for requested qty for different stocks.