mirror of
https://github.com/friendica/friendica
synced 2025-04-21 03:10:11 +00:00
Moved API\Notification tests
This commit is contained in:
parent
f2ca21935e
commit
6725f05ab2
8 changed files with 161 additions and 86 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue