Revert "Revert "Replace Module::init() with Constructors""

This reverts commit 89d6c89b67.
This commit is contained in:
Philipp 2021-11-19 20:18:48 +01:00
parent 942001b04d
commit 645e4edc63
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
43 changed files with 1226 additions and 922 deletions

View file

@ -21,6 +21,7 @@
namespace Friendica\Test\src\Module\Api\Friendica\Photo;
use Friendica\DI;
use Friendica\Module\Api\Friendica\Photo\Delete;
use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Test\src\Module\Api\ApiTest;
@ -30,7 +31,7 @@ class DeleteTest extends ApiTest
public function testEmpty()
{
$this->expectException(BadRequestException::class);
(new Delete())->rawContent();
(new Delete(DI::l10n()))->rawContent();
}
public function testWithoutAuthenticatedUser()
@ -41,7 +42,7 @@ class DeleteTest extends ApiTest
public function testWrong()
{
$this->expectException(BadRequestException::class);
(new Delete(['photo_id' => 1]))->rawContent();
(new Delete(DI::l10n(), ['photo_id' => 1]))->rawContent();
}
public function testWithCorrectPhotoId()