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\MultiFactorAuth\StorefrontApi\Fixtures; |
11
|
|
|
|
12
|
|
|
use Generated\Shared\Transfer\CustomerTransfer; |
|
|
|
|
13
|
|
|
use PyzTest\Glue\MultiFactorAuth\MultiFactorAuthStorefrontApiTester; |
14
|
|
|
use SprykerTest\Shared\Testify\Fixtures\FixturesBuilderInterface; |
15
|
|
|
use SprykerTest\Shared\Testify\Fixtures\FixturesContainerInterface; |
16
|
|
|
|
17
|
|
|
class MultiFactorAuthStorefrontApiFixtures implements FixturesBuilderInterface, FixturesContainerInterface |
18
|
|
|
{ |
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
protected const TEST_CUSTOMER_NAME = '[email protected]'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var string |
26
|
|
|
*/ |
27
|
|
|
protected const MFA_TYPE = 'email'; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var \Generated\Shared\Transfer\CustomerTransfer |
31
|
|
|
*/ |
32
|
|
|
protected CustomerTransfer $customerTransfer; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @param \PyzTest\Glue\MultiFactorAuth\MultiFactorAuthStorefrontApiTester $I |
36
|
|
|
* |
37
|
|
|
* @return \SprykerTest\Shared\Testify\Fixtures\FixturesContainerInterface |
38
|
|
|
*/ |
39
|
|
|
public function buildFixtures(MultiFactorAuthStorefrontApiTester $I): FixturesContainerInterface |
40
|
|
|
{ |
41
|
|
|
$this->customerTransfer = $I->createCustomer(static::TEST_CUSTOMER_NAME); |
42
|
|
|
|
43
|
|
|
return $this; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return \Generated\Shared\Transfer\CustomerTransfer |
48
|
|
|
*/ |
49
|
|
|
public function getCustomerTransfer(): CustomerTransfer |
50
|
|
|
{ |
51
|
|
|
return $this->customerTransfer; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @param string $resourceType |
56
|
|
|
* |
57
|
|
|
* @return array<string, mixed> |
58
|
|
|
*/ |
59
|
|
|
public function createRequestPayload(string $resourceType): array |
60
|
|
|
{ |
61
|
|
|
return [ |
62
|
|
|
'data' => [ |
63
|
|
|
'type' => $resourceType, |
64
|
|
|
'attributes' => [ |
65
|
|
|
'type' => static::MFA_TYPE, |
66
|
|
|
], |
67
|
|
|
], |
68
|
|
|
]; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param string $resourceName |
73
|
|
|
* |
74
|
|
|
* @return string |
75
|
|
|
*/ |
76
|
|
|
public function generateUrl(string $resourceName): string |
77
|
|
|
{ |
78
|
|
|
return sprintf('/%s', $resourceName); |
79
|
|
|
} |
80
|
|
|
} |
81
|
|
|
|
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