mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Fix tests
This commit is contained in:
parent
14ec87e68c
commit
313d74598d
4 changed files with 10 additions and 9 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Module\Api\Friendica\Photo;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\Friendica\Photo\Delete;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
|
@ -31,7 +32,7 @@ class DeleteTest extends ApiTest
|
|||
public function testEmpty()
|
||||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
(new Delete(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run();
|
||||
(new Delete(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::POST]))->run();
|
||||
}
|
||||
|
||||
public function testWithoutAuthenticatedUser()
|
||||
|
@ -42,7 +43,7 @@ class DeleteTest extends ApiTest
|
|||
public function testWrong()
|
||||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
(new Delete(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run(['photo_id' => 1]);
|
||||
(new Delete(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), ['REQUEST_METHOD' => Router::POST]))->run(['photo_id' => 1]);
|
||||
}
|
||||
|
||||
public function testWithCorrectPhotoId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue