added requrest info test

This commit is contained in:
Guillermo Dev
2018-10-13 18:46:23 +02:00
parent 9c928cfa54
commit 830eb65e55
6 changed files with 33 additions and 15 deletions

View File

@@ -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())
);
}
}