|
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\Carts\RestApi\Fixtures; |
|
11
|
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\MoneyValueTransfer; |
|
|
|
|
|
|
13
|
|
|
use Generated\Shared\Transfer\PriceProductTransfer; |
|
|
|
|
|
|
14
|
|
|
use Generated\Shared\Transfer\ProductConcreteTransfer; |
|
|
|
|
|
|
15
|
|
|
use Generated\Shared\Transfer\StockProductTransfer; |
|
|
|
|
|
|
16
|
|
|
use PyzTest\Glue\Carts\CartsApiTester; |
|
17
|
|
|
use Spryker\Zed\Store\Business\StoreFacadeInterface; |
|
18
|
|
|
|
|
19
|
|
|
trait CartsRestApiFixturesTrait |
|
20
|
|
|
{ |
|
21
|
|
|
protected function createProduct(CartsApiTester $I): ProductConcreteTransfer |
|
22
|
|
|
{ |
|
23
|
|
|
$productConcreteTransfer = $I->haveFullProduct(); |
|
24
|
|
|
|
|
25
|
|
|
$I->haveProductInStockForStore($this->getStoreFacade($I)->getCurrentStore(), [ |
|
26
|
|
|
StockProductTransfer::SKU => $productConcreteTransfer->getSku(), |
|
27
|
|
|
StockProductTransfer::IS_NEVER_OUT_OF_STOCK => 1, |
|
28
|
|
|
]); |
|
29
|
|
|
|
|
30
|
|
|
$priceProductOverride = [ |
|
31
|
|
|
PriceProductTransfer::SKU_PRODUCT_ABSTRACT => $productConcreteTransfer->getAbstractSku(), |
|
32
|
|
|
PriceProductTransfer::SKU_PRODUCT => $productConcreteTransfer->getSku(), |
|
33
|
|
|
PriceProductTransfer::ID_PRODUCT => $productConcreteTransfer->getIdProductConcrete(), |
|
34
|
|
|
PriceProductTransfer::PRICE_TYPE_NAME => 'DEFAULT', |
|
35
|
|
|
PriceProductTransfer::MONEY_VALUE => [ |
|
36
|
|
|
MoneyValueTransfer::NET_AMOUNT => 777, |
|
37
|
|
|
MoneyValueTransfer::GROSS_AMOUNT => 888, |
|
38
|
|
|
], |
|
39
|
|
|
]; |
|
40
|
|
|
$I->havePriceProduct($priceProductOverride); |
|
41
|
|
|
|
|
42
|
|
|
return $productConcreteTransfer; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
protected function getStoreFacade(CartsApiTester $I): StoreFacadeInterface |
|
46
|
|
|
{ |
|
47
|
|
|
return $I->getLocator()->store()->facade(); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|
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