diff --git a/src/Util/HTTPInputData.php b/src/Util/HTTPInputData.php index aebae9ac2..322a462f1 100644 --- a/src/Util/HTTPInputData.php +++ b/src/Util/HTTPInputData.php @@ -271,7 +271,7 @@ class HTTPInputData } /** - * Returns the content of tje current PHP input + * Returns the content of the current PHP input * Mainly used for test doubling * @return false|string */ diff --git a/tests/datasets/http/example1.httpinput b/tests/datasets/http/example1.httpinput new file mode 100644 index 000000000..24cef8c82 --- /dev/null +++ b/tests/datasets/http/example1.httpinput @@ -0,0 +1,3 @@ +anything you want +As you +like it diff --git a/tests/src/Util/HTTPInputDataTest.php b/tests/src/Util/HTTPInputDataTest.php index f1deaa7ff..a343e1a76 100644 --- a/tests/src/Util/HTTPInputDataTest.php +++ b/tests/src/Util/HTTPInputDataTest.php @@ -41,11 +41,11 @@ class HTTPInputDataTest extends MockedTest { return [ 'example' => [ - 'input' => 'anything you want', + 'input' => file_get_contents(__DIR__ . '/../../datasets/http/example1.httpinput'), 'expected' => [ 'variables' => [ - 'var1' => 'value', - 'var2' => 'value', + 'var1' => 'value1', + 'var2' => 'value2', ], 'files' => [] ] @@ -69,6 +69,6 @@ class HTTPInputDataTest extends MockedTest HTTPInputDataDouble::setPhpInputStream($stream); $output = HTTPInputDataDouble::process(); - $this->assertEqualsCanonicalizing($output, $expected); + $this->assertEqualsCanonicalizing($expected, $output); } }