mirror of
https://github.com/friendica/friendica
synced 2025-04-22 04:30:10 +00:00
Fix test
This commit is contained in:
parent
68655d0dcb
commit
901068f770
5 changed files with 126 additions and 93 deletions
|
@ -27,9 +27,11 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Database\Database;
|
||||
use Friendica\DI;
|
||||
use Friendica\Security\Authentication;
|
||||
use Friendica\Security\BasicAuth;
|
||||
use Friendica\Test\FixtureTest;
|
||||
use Friendica\Test\Util\AppDouble;
|
||||
use Friendica\Test\Util\AuthenticationDouble;
|
||||
use Friendica\Test\Util\AuthTestConfig;
|
||||
|
||||
abstract class ApiTest extends FixtureTest
|
||||
{
|
||||
|
@ -60,9 +62,19 @@ abstract class ApiTest extends FixtureTest
|
|||
// Manual override to bypass API authentication
|
||||
DI::app()->setIsLoggedIn(true);
|
||||
|
||||
AuthTestConfig::$authenticated = true;
|
||||
AuthTestConfig::$user_id = 42;
|
||||
|
||||
$this->installAuthTest();
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
BasicAuth::setCurrentUserID();
|
||||
|
||||
parent::tearDown(); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* installs auththest.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue