Skip to content

Commit

Permalink
Updated the unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Mar 15, 2019
1 parent bd20cca commit 724816d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ClientTest.php
Expand Up @@ -28,7 +28,7 @@ function testSendMessage(): void {
// It should not send invalid messages with valid credentials.
try {
(new Client('anonymous', 'secret'))->sendMessage('');
$this->fail('An empty message with valid credentials should not be sent');
$this->fail('Exception not thrown.');
}

catch (\Throwable $e) {
Expand All @@ -38,7 +38,7 @@ function testSendMessage(): void {
// It should throw a `ClientException` if a network error occurred.
try {
(new Client('anonymous', 'secret', new Uri('http://localhost')))->sendMessage('Hello World!');
$this->fail('A message with an invalid endpoint should not be sent');
$this->fail('Exception not thrown.');
}

catch (\Throwable $e) {
Expand All @@ -53,7 +53,7 @@ function testSendMessage(): void {
}

catch (\Throwable $e) {
assertThat($e, isInstanceOf(ClientException::class));
$this->fail($e->getMessage());
}
}
}
Expand Down

0 comments on commit 724816d

Please sign in to comment.