Skip to content

Commit

Permalink
replace HTTP_HOST with SERVE_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
rikmeijer committed Oct 30, 2023
1 parent f2dfe91 commit c735803
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Start internal PHP Webserver to run feature tests
env:
HTTP_HOST: "localhost:8000"
SERVE_HOST: "127.0.0.1:8000"
run: nohup php serve.php 2>&1 &

- name: Run test suite
Expand Down
2 changes: 1 addition & 1 deletion serve.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function handleRequest(Request $request) : Response
$errorHandler = new DefaultErrorHandler();

$server = SocketHttpServer::createForDirectAccess($logger);
$server->expose($_ENV['HTTP_HOST']);
$server->expose($_ENV['SERVE_HOST']);
$server->start($requestHandler, $errorHandler);

// Serve requests until SIGINT or SIGTERM is received by the process.
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
private $curl;

public function open(string $path) {
$this->curl = curl_init('http://' . $_ENV['HTTP_HOST'] . $path);
$this->curl = curl_init('http://' . $_ENV['SERVE_HOST'] . $path);
curl_setopt_array($this->curl, [
CURLOPT_HTTPHEADER => [
'Accept: text/html'
Expand Down

0 comments on commit c735803

Please sign in to comment.