Skip to content

Commit

Permalink
chore: fix notifications tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliot Bruneel committed Oct 3, 2023
1 parent 0668af6 commit ac240db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/CrowdinApiClient/Api/Enterprise/AbstractTestApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function mockRequest(array $params)
}

if (isset($params['body'])) {
// die(var_dump($params['body'], $options['body']));

$this->assertEquals($params['body'], $options['body']);
}
if (isset($params['header'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function testSendNotificationToOrganizationMembers()
$this->mockRequest([
'method' => 'post',
'uri' => 'https://organization_domain.crowdin.com/api/v2/notify',
'body' => $params,
'body' => json_encode($params),
'response' => null
]);

Expand Down
4 changes: 2 additions & 2 deletions tests/CrowdinApiClient/Api/NotificationApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testSendToAuthenticatedUser()
$this->mockRequest([
'method' => 'post',
'uri' => 'https://api.crowdin.com/api/v2/notify',
'body' => $params,
'body' => json_encode($params),
'response' => null
]);

Expand All @@ -31,7 +31,7 @@ public function testSendNotificationToProjectMembers()
$this->mockRequest([
'method' => 'post',
'uri' => 'https://api.crowdin.com/api/v2/projects/2/notify',
'body' => $params,
'body' => json_encode($params),
'response' => null
]);

Expand Down

0 comments on commit ac240db

Please sign in to comment.