mirror of
https://github.com/friendica/friendica
synced 2025-04-29 08:24:23 +02: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
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Special;
|
||||
|
||||
use Friendica\App\Arguments;
|
||||
use Friendica\App\Page;
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\DI;
|
||||
|
@ -14,7 +12,9 @@ class OptionsTest extends FixtureTest
|
|||
{
|
||||
public function testOptions()
|
||||
{
|
||||
$response = (new Options(DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::OPTIONS]))->run();
|
||||
$this->useHttpMethod(Router::OPTIONS);
|
||||
|
||||
$response = (new Options(DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run();
|
||||
|
||||
self::assertEmpty((string)$response->getBody());
|
||||
self::assertEquals(204, $response->getStatusCode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue