Moved API\Notification tests

This commit is contained in:
Philipp 2021-11-12 21:35:21 +01:00
parent f2ca21935e
commit 6725f05ab2
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
8 changed files with 161 additions and 86 deletions

View file

@ -7,8 +7,10 @@ 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;
class ApiTest extends FixtureTest
@ -18,12 +20,20 @@ class ApiTest extends FixtureTest
parent::setUp(); // TODO: Change the autogenerated stub
$this->dice = $this->dice
->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true]);
->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true])
->addRule(ApiResponse::class, ['instanceOf' => ApiResponseDouble::class, 'shared' => true]);
DI::init($this->dice);
$this->installAuthTest();
}
protected function tearDown(): void
{
ApiResponseDouble::reset();
parent::tearDown();
}
/**
* installs auththest.
*