diff --git a/log/log.txt b/log/log.txt index f603907..3cf45b2 100644 --- a/log/log.txt +++ b/log/log.txt @@ -1,15 +1,16 @@ -(n-a) - [13.10.2018 16:36:29] - 400 NoArguments - 0.41ms - (none) -(n-a) - [13.10.2018 16:36:29] - 400 NoArguments - 0.75ms - (none) -(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 1.06ms - (none) -(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 0.04ms - (none) -(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 0.05ms - (none) -(n-a) - [13.10.2018 16:36:29] - 400 BadMethod - 0.06ms - someNonExistentMockFunction() -(n-a) - [13.10.2018 16:36:29] - 400 BadMethod - 0.06ms - someNonExistentMockFunction() -(n-a) - [13.10.2018 16:36:29] - 400 TooFewArgs - 0.25ms - someMockFunction() -(n-a) - [13.10.2018 16:36:29] - 400 TooFewArgs - 0.16ms - someMockFunction(val) -(n-a) - [13.10.2018 16:36:29] - 400 TooManyArgs - 0.18ms - someMockFunction(val, val, val, val) -(n-a) - [13.10.2018 16:36:29] - 200 - 0.03ms - someMockFunction(val, val) -(n-a) - [13.10.2018 16:36:29] - 200 - 0.02ms - someMockFunction(val, val, val) -(n-a) - [13.10.2018 16:36:29] - 200 - 0.02ms - someMockFunction(val, val, val) -(n-a) - [13.10.2018 16:36:29] - 200 - 0.03ms - someOtherMockFunction(one, two, threeOpt) -(n-a) - [13.10.2018 16:36:29] - 200 - 0.02ms - someOtherMockFunction(two, threeOpt, one) +(n-a) - [13.10.2018 16:45:43] - 400 NoArguments - 0.44ms - (none) +(n-a) - [13.10.2018 16:45:43] - 400 NoArguments - 0.74ms - (none) +(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 1.04ms - (none) +(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 0.07ms - (none) +(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 0.03ms - (none) +(n-a) - [13.10.2018 16:45:43] - 400 BadMethod - 0.08ms - someNonExistentMockFunction() +(n-a) - [13.10.2018 16:45:43] - 400 BadMethod - 0.07ms - someNonExistentMockFunction() +(n-a) - [13.10.2018 16:45:43] - 400 TooFewArgs - 0.3ms - someMockFunction() +(n-a) - [13.10.2018 16:45:43] - 400 TooFewArgs - 0.17ms - someMockFunction(val) +(n-a) - [13.10.2018 16:45:43] - 400 TooManyArgs - 0.18ms - someMockFunction(val, val, val, val) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.04ms - someMockFunction(val, val) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.02ms - someMockFunction(val, val, val) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.02ms - someMockFunction(val, val, val) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.03ms - someOtherMockFunction(one, two, threeOpt) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.02ms - someOtherMockFunction(two, threeOpt, one) +(n-a) - [13.10.2018 16:45:43] - 200 - 0.02ms - someOtherMockFunction(two, threeOpt, one) diff --git a/src/Webservice/.WebService.php.swp b/src/Webservice/.WebService.php.swp deleted file mode 100644 index c6db1db..0000000 Binary files a/src/Webservice/.WebService.php.swp and /dev/null differ diff --git a/src/Webservice/Exception/.UsageException.php.swp b/src/Webservice/Exception/.UsageException.php.swp deleted file mode 100644 index 2da13ae..0000000 Binary files a/src/Webservice/Exception/.UsageException.php.swp and /dev/null differ diff --git a/tests/Webservice/.MockWebserviceSubclass.php.swp b/tests/Webservice/.MockWebserviceSubclass.php.swp deleted file mode 100644 index 566dc8e..0000000 Binary files a/tests/Webservice/.MockWebserviceSubclass.php.swp and /dev/null differ diff --git a/tests/Webservice/.WebserviceTest.php.swp b/tests/Webservice/.WebserviceTest.php.swp deleted file mode 100644 index f8519d6..0000000 Binary files a/tests/Webservice/.WebserviceTest.php.swp and /dev/null differ diff --git a/tests/Webservice/WebserviceTest.php b/tests/Webservice/WebserviceTest.php index 31cc2fc..0fee4f4 100644 --- a/tests/Webservice/WebserviceTest.php +++ b/tests/Webservice/WebserviceTest.php @@ -238,4 +238,21 @@ class WebserviceTest extends TestCase ) ), $responseArray['result']); } + + public function testWebserviceAddsAllRequestInfoToTheLog() + { + $_GET = array( + 'func' => 'someOtherMockFunction', + 'anyParamName2' => 'two', + 'anyParamName3' => 'threeOpt', + 'anyParamName1' => 'one', + ); + + $this->webservice->run(false); + $response = ob_get_clean(); + $this->assertSame( + array('version', 'ip', 'date', 'func', 'error', 'status', 'time'), + array_keys(Logger::getData()) + ); + } }