Skip to content

Commit

Permalink
Use TestCase::fail instead of failing assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Jun 3, 2022
1 parent 0beea19 commit 1cd8980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/ReindexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public function testReindexWithRemote(): void

try {
$reindex->run();
$this->assertFalse(true, 'Elasticsearch should have thrown an Exception, maybe the remote option has not been sent.');

$this->fail('Elasticsearch should have thrown an Exception, maybe the remote option has not been sent.');
} catch (ResponseException $exception) {
$this->assertStringContainsString('reindex.remote.whitelist', $exception->getMessage());
}
Expand Down

0 comments on commit 1cd8980

Please sign in to comment.