mirror of
https://github.com/friendica/friendica
synced 2025-04-20 15:50:12 +00:00
Use X-REQUEST-ID for Error pages
This commit is contained in:
parent
5584e7a4e5
commit
4f1bb0d274
55 changed files with 218 additions and 130 deletions
|
@ -27,12 +27,14 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Special\HTTPException;
|
||||
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;
|
||||
use Mockery\MockInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
abstract class ApiTest extends FixtureTest
|
||||
|
@ -59,6 +61,9 @@ abstract class ApiTest extends FixtureTest
|
|||
'nurl' => 'http://localhost/profile/othercontact'
|
||||
];
|
||||
|
||||
/** @var HTTPException */
|
||||
protected $httpExceptionMock;
|
||||
|
||||
// User ID that we know is not in the database
|
||||
const WRONG_USER_ID = 666;
|
||||
|
||||
|
@ -175,6 +180,8 @@ abstract class ApiTest extends FixtureTest
|
|||
// Manual override to bypass API authentication
|
||||
DI::app()->setIsLoggedIn(true);
|
||||
|
||||
$this->httpExceptionMock = $this->dice->create(HTTPException::class);
|
||||
|
||||
AuthTestConfig::$authenticated = true;
|
||||
AuthTestConfig::$user_id = 42;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue