mirror of
https://github.com/friendica/friendica
synced 2025-04-20 17:50:12 +00:00
Inherit ApiResponse
from Response
This commit is contained in:
parent
561aba18e3
commit
537b74f307
46 changed files with 326 additions and 277 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue