mirror of
https://github.com/friendica/friendica
synced 2025-04-23 20:30:10 +00:00
Introduce FixtureTest::useHttpMethod for manually overwrite the HTTP Method argument
This commit is contained in:
parent
4e67bfed8d
commit
5e85939502
36 changed files with 175 additions and 82 deletions
|
@ -18,7 +18,7 @@ class SearchTest extends ApiTest
|
|||
*/
|
||||
public function testApiUsersSearch()
|
||||
{
|
||||
$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET]))
|
||||
$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run([
|
||||
'q' => static::OTHER_USER['name']
|
||||
]);
|
||||
|
@ -35,7 +35,7 @@ class SearchTest extends ApiTest
|
|||
*/
|
||||
public function testApiUsersSearchWithXml()
|
||||
{
|
||||
$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET], [
|
||||
$respone = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
'extension' => ICanCreateResponses::TYPE_XML
|
||||
]))->run([
|
||||
'q' => static::OTHER_USER['name']
|
||||
|
@ -53,7 +53,7 @@ class SearchTest extends ApiTest
|
|||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
|
||||
(new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::GET]))
|
||||
(new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue