|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the Spryker Commerce OS. |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
declare(strict_types = 1); |
|
9
|
|
|
|
|
10
|
|
|
namespace PyzTest\Glue\AlternativeProducts\RestApi; |
|
11
|
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\ProductConcreteTransfer; |
|
|
|
|
|
|
13
|
|
|
use Generated\Shared\Transfer\StockProductTransfer; |
|
|
|
|
|
|
14
|
|
|
use PyzTest\Glue\AlternativeProducts\AlternativeProductsRestApiTester; |
|
15
|
|
|
use SprykerTest\Shared\Testify\Fixtures\FixturesBuilderInterface; |
|
16
|
|
|
use SprykerTest\Shared\Testify\Fixtures\FixturesContainerInterface; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Auto-generated group annotations |
|
20
|
|
|
* |
|
21
|
|
|
* @group PyzTest |
|
22
|
|
|
* @group Glue |
|
23
|
|
|
* @group AlternativeProducts |
|
24
|
|
|
* @group RestApi |
|
25
|
|
|
* @group AbstractAlternativeProductsRestApiFixtures |
|
26
|
|
|
* Add your own group annotations below this line |
|
27
|
|
|
* @group EndToEnd |
|
28
|
|
|
*/ |
|
29
|
|
|
class AbstractAlternativeProductsRestApiFixtures implements FixturesBuilderInterface, FixturesContainerInterface |
|
30
|
|
|
{ |
|
31
|
|
|
protected ProductConcreteTransfer $productConcreteTransfer; |
|
32
|
|
|
|
|
33
|
|
|
protected ProductConcreteTransfer $alternativeProductConcreteTransfer; |
|
34
|
|
|
|
|
35
|
|
|
public function getProductConcreteTransfer(): ProductConcreteTransfer |
|
36
|
|
|
{ |
|
37
|
|
|
return $this->productConcreteTransfer; |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
public function getAlternativeProductConcreteTransfer(): ProductConcreteTransfer |
|
41
|
|
|
{ |
|
42
|
|
|
return $this->alternativeProductConcreteTransfer; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
public function buildFixtures(AlternativeProductsRestApiTester $I): FixturesContainerInterface |
|
46
|
|
|
{ |
|
47
|
|
|
$this->createAlternativeRelationBetweenProducts($I); |
|
48
|
|
|
|
|
49
|
|
|
return $this; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
protected function createAlternativeRelationBetweenProducts(AlternativeProductsRestApiTester $I): void |
|
53
|
|
|
{ |
|
54
|
|
|
$this->productConcreteTransfer = $I->haveFullProduct(); |
|
55
|
|
|
$I->haveProductInStock([StockProductTransfer::SKU => $this->productConcreteTransfer->getSku()]); |
|
56
|
|
|
|
|
57
|
|
|
$this->alternativeProductConcreteTransfer = $I->haveFullProduct(); |
|
58
|
|
|
$I->haveProductInStock([StockProductTransfer::SKU => $this->alternativeProductConcreteTransfer->getSku()]); |
|
59
|
|
|
|
|
60
|
|
|
$I->haveProductAlternative($this->productConcreteTransfer, $this->alternativeProductConcreteTransfer->getAbstractSku()); |
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths