Skip to content

Commit

Permalink
Replace Windows new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyjo20 committed Mar 20, 2024
1 parent 72aac79 commit 34d50f3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/Feature/DebugTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@

$output = stream_get_contents($output);

expect($output)->toEqual(<<<END
$expected = <<<END
Saloon Request (UserRequest) -> array:6 [
"connector" => "Saloon\Tests\Fixtures\Connectors\TestConnector"
"request" => "Saloon\Tests\Fixtures\Requests\UserRequest"
Expand All @@ -167,7 +167,9 @@
]
"body" => ""
]\n
END);
END;

expect($output)->toEqual(str_replace("\r\n", "\n", $expected));
});

test('the default debugResponse driver will dump an output using symfony var-dumper', function () {
Expand All @@ -189,13 +191,15 @@

$output = stream_get_contents($output);

expect($output)->toEqual(<<<END
$expected = <<<END
Saloon Response (UserRequest) -> array:3 [
"status" => 500
"headers" => []
"body" => "{"name":"Sam"}"
]\n
END);
END;

expect($output)->toEqual(str_replace("\r\n", "\n", $expected));
});

test('the debug method will output both request and response at the same time', function () {
Expand All @@ -217,7 +221,7 @@

$output = stream_get_contents($output);

expect($output)->toEqual(<<<END
$expected = <<<END
Saloon Request (UserRequest) -> array:6 [
"connector" => "Saloon\Tests\Fixtures\Connectors\TestConnector"
"request" => "Saloon\Tests\Fixtures\Requests\UserRequest"
Expand All @@ -234,7 +238,9 @@
"headers" => []
"body" => "{"name":"Sam"}"
]\n
END);
END;

expect($output)->toEqual(str_replace("\r\n", "\n", $expected));
});

test('the debug method can kill the application', function () {
Expand Down

0 comments on commit 34d50f3

Please sign in to comment.