Skip to content

Commit b026e9b

Browse files
author
Karpenko, Oleksandr
committed
MAGETWO-63667: Can't get store-specific data via catalog API
1 parent 4cd9788 commit b026e9b

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Api/SearchCriteria/CollectionProcessor/FilterProcessor/ProductWebsiteFilterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Catalog\Model\ResourceModel\Product\Collection;
1010
use Magento\Framework\Api\Filter;
1111

12-
class ProductCategoryFilterTest extends \PHPUnit_Framework_TestCase
12+
class ProductWebsiteFilterTest extends \PHPUnit_Framework_TestCase
1313
{
1414
/** @var ProductWebsiteFilter */
1515
private $model;

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryInterfaceTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -751,15 +751,9 @@ public function testGetListWithFilteringByWebsite()
751751
$this->assertArrayHasKey('search_criteria', $response);
752752
$this->assertArrayHasKey('total_count', $response);
753753
$this->assertArrayHasKey('items', $response);
754+
$this->assertTrue(isset($response['items'][0]['sku']));
755+
$this->assertEquals('simple-2', $response['items'][0]['sku']);
754756
$this->assertTrue(count($response['items']) == 1);
755-
756-
$isSkuExists = false;
757-
foreach ($response['items'] as $item) {
758-
if ($item['sku'] == 'simple-2') {
759-
$isSkuExists = true;
760-
}
761-
}
762-
$this->assertTrue($isSkuExists);
763757
}
764758

765759
/**

0 commit comments

Comments
 (0)