mirror of
https://github.com/friendica/friendica
synced 2024-11-09 17:02:54 +00:00
Fix tests
This commit is contained in:
parent
2c9f312e33
commit
1f18e096fe
3 changed files with 16 additions and 0 deletions
|
@ -47,6 +47,7 @@ class Destroy extends BaseApi
|
||||||
|
|
||||||
$this->dba = $dba;
|
$this->dba = $dba;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function post(array $request = [])
|
protected function post(array $request = [])
|
||||||
{
|
{
|
||||||
$this->checkAllowedScope(BaseApi::SCOPE_WRITE);
|
$this->checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||||
|
|
|
@ -29,6 +29,13 @@ use Friendica\Test\src\Module\Api\ApiTest;
|
||||||
|
|
||||||
class DestroyTest extends ApiTest
|
class DestroyTest extends ApiTest
|
||||||
{
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->useHttpMethod(Router::POST);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the api_direct_messages_destroy() function.
|
* Test the api_direct_messages_destroy() function.
|
||||||
*
|
*
|
||||||
|
@ -37,6 +44,7 @@ class DestroyTest extends ApiTest
|
||||||
public function testApiDirectMessagesDestroy()
|
public function testApiDirectMessagesDestroy()
|
||||||
{
|
{
|
||||||
$this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
|
$this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
|
||||||
|
|
||||||
(new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
|
(new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
|
||||||
->run($this->httpExceptionMock);
|
->run($this->httpExceptionMock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,13 @@ use Friendica\Test\src\Module\Api\ApiTest;
|
||||||
|
|
||||||
class NewDMTest extends ApiTest
|
class NewDMTest extends ApiTest
|
||||||
{
|
{
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->useHttpMethod(Router::POST);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the api_direct_messages_new() function.
|
* Test the api_direct_messages_new() function.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue