Apply rules to tests and tasks

This commit is contained in:
Mike Jolley
2024-03-18 13:44:47 +00:00
committed by Jan Jakeš
parent 435f638011
commit 0d6fe6e5eb
87 changed files with 399 additions and 254 deletions

View File

@@ -98,7 +98,9 @@ class ServicesTest extends \MailPoetTest {
$response = $servicesEndpoint->checkMSSKey($this->data);
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
$errorMessage = $this->invokeMethod(
$servicesEndpoint, 'getErrorDescriptionByCode', [Bridge::CHECK_ERROR_UNAVAILABLE]
$servicesEndpoint,
'getErrorDescriptionByCode',
[Bridge::CHECK_ERROR_UNAVAILABLE]
);
$this->assertIsString($errorMessage);
verify($response->errors[0]['message'])->stringContainsString($errorMessage);
@@ -117,7 +119,9 @@ class ServicesTest extends \MailPoetTest {
$response = $servicesEndpoint->checkMSSKey($this->data);
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
$errorMessage = $this->invokeMethod(
$servicesEndpoint, 'getErrorDescriptionByCode', [Bridge::CHECK_ERROR_UNKNOWN]
$servicesEndpoint,
'getErrorDescriptionByCode',
[Bridge::CHECK_ERROR_UNKNOWN]
);
$this->assertIsString($errorMessage);
verify($response->errors[0]['message'])->stringContainsString($errorMessage);
@@ -308,7 +312,9 @@ class ServicesTest extends \MailPoetTest {
$response = $servicesEndpoint->checkPremiumKey($this->data);
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
$errorMessage = $this->invokeMethod(
$servicesEndpoint, 'getErrorDescriptionByCode', [Bridge::CHECK_ERROR_UNAVAILABLE]
$servicesEndpoint,
'getErrorDescriptionByCode',
[Bridge::CHECK_ERROR_UNAVAILABLE]
);
$this->assertIsString($errorMessage);
verify($response->errors[0]['message'])->stringContainsString($errorMessage);
@@ -327,7 +333,9 @@ class ServicesTest extends \MailPoetTest {
$response = $servicesEndpoint->checkPremiumKey($this->data);
verify($response->status)->equals(APIResponse::STATUS_NOT_FOUND);
$errorMessage = $this->invokeMethod(
$servicesEndpoint, 'getErrorDescriptionByCode', [Bridge::CHECK_ERROR_UNKNOWN]
$servicesEndpoint,
'getErrorDescriptionByCode',
[Bridge::CHECK_ERROR_UNKNOWN]
);
$this->assertIsString($errorMessage);
verify($response->errors[0]['message'])->stringContainsString($errorMessage);