1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEcoTest\Zed\FirstData\Business; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\FirstDataApiRequestTransfer; |
|
|
|
|
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Auto-generated group annotations |
14
|
|
|
* |
15
|
|
|
* @group SprykerEcoTest |
16
|
|
|
* @group Zed |
17
|
|
|
* @group FirstData |
18
|
|
|
* @group Business |
19
|
|
|
* @group Facade |
20
|
|
|
* @group FirstDataFacadeCancelTest |
21
|
|
|
*/ |
22
|
|
|
class FirstDataFacadeCancelTest extends AbstractFirstDataFacadeTest |
23
|
|
|
{ |
24
|
|
|
public const REQUEST_TYPE = 'VoidTransaction'; |
25
|
|
|
|
26
|
|
|
public const TRANSACTION_TYPE = 'VOID'; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var \SprykerEcoTest\Zed\FirstData\FirstDataBusinessTester |
30
|
|
|
*/ |
31
|
|
|
protected $tester; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var array |
35
|
|
|
*/ |
36
|
|
|
protected $clientResponse; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @return void |
40
|
|
|
*/ |
41
|
|
|
public function setUp(): void |
42
|
|
|
{ |
43
|
|
|
parent::setUp(); |
44
|
|
|
|
45
|
|
|
$this->clientResponse = $this->tester->getClientResponse(); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return void |
50
|
|
|
*/ |
51
|
|
|
public function testExecuteCancelPreAuthOmsCommandSuccessCase(): void |
52
|
|
|
{ |
53
|
|
|
//Arrange |
54
|
|
|
$clientResponse = $this->clientResponse; |
55
|
|
|
$clientResponse['transactionType'] = static::TRANSACTION_TYPE; |
56
|
|
|
$firstDataApiRequestTransfer = new FirstDataApiRequestTransfer(); |
57
|
|
|
$firstDataApiRequestTransfer->setTransactionId($clientResponse['orderId']); |
58
|
|
|
$firstDataApiRequestTransfer->setRequestType(static::REQUEST_TYPE); |
59
|
|
|
|
60
|
|
|
//Act |
61
|
|
|
$response = $this->tester |
62
|
|
|
->getFirstDataFacade($this->getFirstDataBusinessFactoryMock($clientResponse)) |
63
|
|
|
->executeCancelOmsCommand($firstDataApiRequestTransfer); |
64
|
|
|
|
65
|
|
|
//Assert |
66
|
|
|
$this->assertTrue($response->getIsSuccess()); |
67
|
|
|
$this->assertNull($response->getError()); |
68
|
|
|
$this->assertNotEmpty($response->getClientResponse()); |
69
|
|
|
$this->assertEquals($firstDataApiRequestTransfer->getTransactionId(), $response->getClientResponse()->getOrderId()); |
70
|
|
|
$this->assertEquals(static::TRANSACTION_TYPE, $response->getClientResponse()->getTransactionType()); |
71
|
|
|
} |
72
|
|
|
} |
73
|
|
|
|
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