Skip to content

Commit

Permalink
regression test to validate issue won't happen again
Browse files Browse the repository at this point in the history
  • Loading branch information
mudhoney committed Nov 19, 2024
1 parent d3e1953 commit b1fc63d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/unit_tests/regression/SentryIssue1Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php declare(strict_types=1);
/**
* @author Kasim Necdet Percinel <[email protected]>
*/

use PHPUnit\Framework\TestCase;
use GuzzleHttp\Client;

final class SentryIssue1Test extends TestCase
{
public function testItShouldDumpProperResponseCodeAndPhaseIfThereIsNoAction(): void
{
//Create a Guzzle client
$client = new Client();

// Send a GET request to the specified URL
$response = $client->get(HV_WEB_ROOT_URL, [
'http_errors' => false
]);

// Assert Status code and Reason Phrase
$this->assertEquals($response->getStatusCode(), 400);
$this->assertEquals($response->getReasonPhrase(), 'Bad Request');
}
}

0 comments on commit b1fc63d

Please sign in to comment.