added requrest info test
This commit is contained in:
31
log/log.txt
31
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:45:43] - 400 NoArguments - 0.44ms - (none)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 NoArguments - 0.75ms - (none)
|
(n-a) - [13.10.2018 16:45:43] - 400 NoArguments - 0.74ms - (none)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 1.06ms - (none)
|
(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 1.04ms - (none)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 0.04ms - (none)
|
(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 0.07ms - (none)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 MissingMethod - 0.05ms - (none)
|
(n-a) - [13.10.2018 16:45:43] - 400 MissingMethod - 0.03ms - (none)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 BadMethod - 0.06ms - someNonExistentMockFunction()
|
(n-a) - [13.10.2018 16:45:43] - 400 BadMethod - 0.08ms - someNonExistentMockFunction()
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 BadMethod - 0.06ms - someNonExistentMockFunction()
|
(n-a) - [13.10.2018 16:45:43] - 400 BadMethod - 0.07ms - someNonExistentMockFunction()
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 TooFewArgs - 0.25ms - someMockFunction()
|
(n-a) - [13.10.2018 16:45:43] - 400 TooFewArgs - 0.3ms - someMockFunction()
|
||||||
(n-a) - [13.10.2018 16:36:29] - 400 TooFewArgs - 0.16ms - someMockFunction(val)
|
(n-a) - [13.10.2018 16:45:43] - 400 TooFewArgs - 0.17ms - 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:45:43] - 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:45:43] - 200 - 0.04ms - someMockFunction(val, val)
|
||||||
(n-a) - [13.10.2018 16:36:29] - 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:36:29] - 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:36:29] - 200 - 0.03ms - someOtherMockFunction(one, two, threeOpt)
|
(n-a) - [13.10.2018 16:45:43] - 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] - 200 - 0.02ms - someOtherMockFunction(two, threeOpt, one)
|
||||||
|
(n-a) - [13.10.2018 16:45:43] - 200 - 0.02ms - someOtherMockFunction(two, threeOpt, one)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -238,4 +238,21 @@ class WebserviceTest extends TestCase
|
|||||||
)
|
)
|
||||||
), $responseArray['result']);
|
), $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())
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user