Skip to content

Commit

Permalink
Magic numbers replaced with class
Browse files Browse the repository at this point in the history
  • Loading branch information
srsathish92 committed Dec 15, 2019
1 parent 97fe3ff commit 9e042b6
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Magento\Catalog\ViewModel\Product\Checker\AddToCompareAvailability;
use Magento\CatalogInventory\Api\StockConfigurationInterface;
use Magento\Catalog\Model\Product;
use \Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use PHPUnit\Framework\MockObject\MockObject;

Expand Down Expand Up @@ -94,11 +95,11 @@ public function testIsAvailableForCompare($status, $isSalable, $isInStock, $isSh
public function isAvailableForCompareDataProvider(): array
{
return [
[1, true, ['is_in_stock' => true], false, true],
[1, true, ['is_in_stock' => false], true, true],
[1, true, [], false, true],
[1, false, [], false, false],
[2, true, ['is_in_stock' => true], false, false]
[Status::STATUS_ENABLED, true, ['is_in_stock' => true], false, true],
[Status::STATUS_ENABLED, true, ['is_in_stock' => false], true, true],
[Status::STATUS_ENABLED, true, [], false, true],
[Status::STATUS_ENABLED, false, [], false, false],
[Status::STATUS_DISABLED, true, ['is_in_stock' => true], false, false]
];
}
}

0 comments on commit 9e042b6

Please sign in to comment.