Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CC-16898 Added server-side validation for product category filters. (…
…#9491) CC-16898 Fixed missing server-side validation for product category filters.
- Loading branch information
1 parent
c36f751
commit 0978543
Showing
8 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...kerTest/Zed/ProductSearch/Business/ProductSearchFacade/GetAllProductAttributeKeysTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/** | ||
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. | ||
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | ||
*/ | ||
|
||
namespace SprykerTest\Zed\ProductSearch\Business\ProductSearchFacade; | ||
|
||
use Codeception\Test\Unit; | ||
use SprykerTest\Zed\ProductSearch\ProductSearchBusinessTester; | ||
|
||
/** | ||
* Auto-generated group annotations | ||
* | ||
* @group SprykerTest | ||
* @group Zed | ||
* @group ProductSearch | ||
* @group Business | ||
* @group ProductSearchFacade | ||
* @group GetAllProductAttributeKeysTest | ||
* | ||
* Add your own group annotations below this line | ||
*/ | ||
class GetAllProductAttributeKeysTest extends Unit | ||
{ | ||
/** | ||
* @var \SprykerTest\Zed\ProductSearch\ProductSearchBusinessTester | ||
*/ | ||
protected ProductSearchBusinessTester $tester; | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function testGetAllProductAttributeKeysShouldReturnAttributeKeys(): void | ||
{ | ||
// Arrange | ||
$this->tester->ensureProductAttributeKeyTableIsEmpty(); | ||
|
||
$expectedProductAttributeKeys = []; | ||
$expectedCount = 3; | ||
for ($i = 0; $i < $expectedCount; $i++) { | ||
$expectedProductAttributeKeys[] = $this->tester->haveProductAttributeKeyEntity()->getKey(); | ||
} | ||
|
||
// Act | ||
$productAttributeKeys = $this->tester->getFacade()->getAllProductAttributeKeys(); | ||
|
||
// Assert | ||
$this->assertCount($expectedCount, $productAttributeKeys); | ||
$this->assertEmpty(array_diff($expectedProductAttributeKeys, $productAttributeKeys)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters