Inherit ApiResponse from Response

This commit is contained in:
Philipp 2021-11-21 21:52:36 +01:00
parent 561aba18e3
commit 537b74f307
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
46 changed files with 326 additions and 277 deletions

View file

@ -25,10 +25,8 @@ use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Database\Database;
use Friendica\DI;
use Friendica\Module\Api\ApiResponse;
use Friendica\Security\Authentication;
use Friendica\Test\FixtureTest;
use Friendica\Test\Util\ApiResponseDouble;
use Friendica\Test\Util\AuthenticationDouble;
abstract class ApiTest extends FixtureTest
@ -53,20 +51,12 @@ abstract class ApiTest extends FixtureTest
parent::setUp(); // TODO: Change the autogenerated stub
$this->dice = $this->dice
->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true])
->addRule(ApiResponse::class, ['instanceOf' => ApiResponseDouble::class, 'shared' => true]);
->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true]);
DI::init($this->dice);
$this->installAuthTest();
}
protected function tearDown(): void
{
ApiResponseDouble::reset();
parent::tearDown();
}
/**
* installs auththest.
*