Skip to content

Commit

Permalink
SessionTest::testURLResolution(): fix test
Browse files Browse the repository at this point in the history
The Render server redirects to `https`, so as things were, we'd have a scheme mismatch in the tests.

By making it explicit that we are requesting an `https` URL and expecting the response from that, the test should pass again (locally).
  • Loading branch information
jrfnl committed Sep 2, 2024
1 parent 7cb0c5c commit 4566d5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Session/SessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

final class SessionTest extends TestCase {
public function testURLResolution() {
$session = new Session($this->httpbin('/'));
$session = new Session($this->httpbin('/', true));

// Set the cookies up
$response = $session->get('/get');
$this->assertTrue($response->success, 'Session property "success" is not equal to true');
$this->assertSame(
$this->httpbin('/get'),
$this->httpbin('/get', true),
$response->url,
'Session property "url" is not equal to the expected get URL'
);
Expand All @@ -22,7 +22,7 @@ public function testURLResolution() {
$this->assertNotNull($data, 'Decoded response body is null');
$this->assertArrayHasKey('url', $data, 'Response data array does not have key "url"');
$this->assertSame(
$this->httpbin('/get'),
$this->httpbin('/get', true),
$data['url'],
'The value of the "url" key in the response data array is not equal to the expected get URL'
);
Expand Down

0 comments on commit 4566d5b

Please sign in to comment.