Skip to content

Commit

Permalink
tests - added error messages to functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nuryagdym committed May 27, 2024
1 parent c40f51f commit 40bb601
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/Functional/EstV3PosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro
);

$response = $this->pos->getResponse();
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? null);
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? '');

$this->assertIsArray($response);
$this->assertNotEmpty($response);
Expand Down Expand Up @@ -208,7 +208,7 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro
);

$response = $this->pos->getResponse();
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? null);
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? '');

$this->assertIsArray($response);
$this->assertNotEmpty($response);
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/GarantiPosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro

$this->pos->cancel($statusOrder);

$this->assertTrue($this->pos->isSuccess());
$response = $this->pos->getResponse();
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? '');
$this->assertIsArray($response);
$this->assertNotEmpty($response);
$this->assertTrue($eventIsThrown);
Expand Down Expand Up @@ -171,9 +171,9 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro
$this->card
);

$this->assertTrue($this->pos->isSuccess());

$response = $this->pos->getResponse();
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? '');

$this->assertIsArray($response);
$this->assertNotEmpty($response);
$this->assertTrue($eventIsThrown);
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/PayForPosTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent) use (&$eventIsThro

$this->pos->cancel($statusOrder);

$this->assertTrue($this->pos->isSuccess());
$response = $this->pos->getResponse();
$this->assertTrue($this->pos->isSuccess(), $response['error_message'] ?? '');
$this->assertIsArray($response);
$this->assertNotEmpty($response);
$this->assertTrue($eventIsThrown);
Expand Down

0 comments on commit 40bb601

Please sign in to comment.