49 $productSkuPattern = str_replace(
'%s',
'[0-9]+', $skuPattern);
53 ->where(
'sku ?', $this->expressionFactory->create([
54 'expression' =>
'REGEXP \'^' . $productSkuPattern .
'$\'' 58 throw new \AssertionError(
60 'Expected amount of products with sku pattern "%s" not equals actual amount',
76 if ($expectedProductType !==
$product->getTypeId()) {
77 throw new \AssertionError(
'Product type is wrong');
$productCollectionFactory
__construct(\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, \Magento\Framework\DB\Sql\ColumnValueExpressionFactory $expressionFactory)
assertProductType($expectedProductType, $product)
assertProductsCount($skuPattern, $expectedCount)