Merge pull request #14593 from Art4/replace-app-with-apphelper-in-tests

Replace App with AppHelper in tests
This commit is contained in:
Hypolite Petovan 2024-12-19 07:30:33 -05:00 committed by GitHub
commit d0d9712ac3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 135 additions and 129 deletions

View file

@ -7,7 +7,6 @@
namespace Friendica\Test; namespace Friendica\Test;
use Friendica\App;
use Friendica\Capabilities\ICanCreateResponses; use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Addon; use Friendica\Core\Addon;
use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Config\Capability\IManageConfigValues;
@ -16,7 +15,6 @@ use Friendica\DI;
use Friendica\Module\Special\HTTPException; use Friendica\Module\Special\HTTPException;
use Friendica\Security\Authentication; use Friendica\Security\Authentication;
use Friendica\Security\BasicAuth; use Friendica\Security\BasicAuth;
use Friendica\Test\Util\AppDouble;
use Friendica\Test\Util\AuthenticationDouble; use Friendica\Test\Util\AuthenticationDouble;
use Friendica\Test\Util\AuthTestConfig; use Friendica\Test\Util\AuthTestConfig;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
@ -158,12 +156,9 @@ abstract class ApiTestCase extends FixtureTestCase
$this->dice = $this->dice $this->dice = $this->dice
->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true]) ->addRule(Authentication::class, ['instanceOf' => AuthenticationDouble::class, 'shared' => true])
->addRule(App::class, ['instanceOf' => AppDouble::class, 'shared' => true]); ;
DI::init($this->dice); DI::init($this->dice);
// Manual override to bypass API authentication
DI::app()->setIsLoggedIn(true);
$this->httpExceptionMock = $this->dice->create(HTTPException::class); $this->httpExceptionMock = $this->dice->create(HTTPException::class);
AuthTestConfig::$authenticated = true; AuthTestConfig::$authenticated = true;
@ -193,7 +188,7 @@ abstract class ApiTestCase extends FixtureTestCase
@include_once($addon_file_path); @include_once($addon_file_path);
if (function_exists($addon . '_install')) { if (function_exists($addon . '_install')) {
$func = $addon . '_install'; $func = $addon . '_install';
$func(DI::app()); $func();
} }
/** @var $config IManageConfigValues */ /** @var $config IManageConfigValues */

View file

@ -1,36 +0,0 @@
<?php
// Copyright (C) 2010-2024, the Friendica project
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
//
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace Friendica\Test\Util;
use Friendica\App;
/**
* Making the App class overridable for specific situations
*
* @see App
*/
class AppDouble extends App
{
/** @var bool Marks/Overwrites if the user is currently logged in */
protected $isLoggedIn = false;
/**
* Manually overwrite the "isLoggedIn" behavior
*
* @param bool $isLoggedIn
*/
public function setIsLoggedIn(bool $isLoggedIn)
{
$this->isLoggedIn = $isLoggedIn;
}
public function isLoggedIn(): bool
{
return $this->isLoggedIn;
}
}

View file

@ -124,7 +124,7 @@ class StatusTest extends FixtureTestCase
*/ */
public function testApiFormatItems() public function testApiFormatItems()
{ {
// This call is needed for this test // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine'); Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$posts = DI::dba()->selectToArray('post-view', ['uri-id']); $posts = DI::dba()->selectToArray('post-view', ['uri-id']);

View file

@ -19,7 +19,7 @@ class SearchTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser());
$response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);
@ -37,7 +37,7 @@ class SearchTest extends ApiTestCase
$directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser());
$response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'searchstring' => 'item_body' 'searchstring' => 'item_body'
]); ]);
@ -58,7 +58,7 @@ class SearchTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(new NullLogger(), DI::dba(), DI::twitterUser());
$response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Search($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'searchstring' => 'test' 'searchstring' => 'test'
]); ]);

View file

@ -52,7 +52,7 @@ class NotificationTest extends ApiTestCase
</notes> </notes>
XML; XML;
$response = (new Notification(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml'])) $response = (new Notification(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertXmlStringEqualsXmlString($assertXml, (string)$response->getBody()); self::assertXmlStringEqualsXmlString($assertXml, (string)$response->getBody());
@ -64,7 +64,7 @@ XML;
public function testWithJsonResult() public function testWithJsonResult()
{ {
$response = (new Notification(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Notification(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -25,7 +25,7 @@ class DeleteTest extends ApiTestCase
public function testEmpty() public function testEmpty()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run($this->httpExceptionMock); (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run($this->httpExceptionMock);
} }
public function testWithoutAuthenticatedUser() public function testWithoutAuthenticatedUser()
@ -36,14 +36,14 @@ class DeleteTest extends ApiTestCase
public function testWrong() public function testWrong()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run($this->httpExceptionMock, ['photo_id' => 1]); (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))->run($this->httpExceptionMock, ['photo_id' => 1]);
} }
public function testValidWithPost() public function testValidWithPost()
{ {
$this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba()); $this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba());
$response = (new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'photo_id' => '709057080661a283a6aa598501504178' 'photo_id' => '709057080661a283a6aa598501504178'
]); ]);
@ -58,7 +58,7 @@ class DeleteTest extends ApiTestCase
{ {
$this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba()); $this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba());
$response = (new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'photo_id' => '709057080661a283a6aa598501504178' 'photo_id' => '709057080661a283a6aa598501504178'
]); ]);

View file

@ -25,7 +25,7 @@ class DeleteTest extends ApiTestCase
public function testEmpty() public function testEmpty()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -33,7 +33,7 @@ class DeleteTest extends ApiTestCase
public function testWrong() public function testWrong()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'album' => 'album_name' 'album' => 'album_name'
]); ]);
@ -43,7 +43,7 @@ class DeleteTest extends ApiTestCase
{ {
$this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba()); $this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba());
$response = (new Delete(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Delete(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'album' => 'test_album'] 'album' => 'test_album']
); );

View file

@ -25,14 +25,14 @@ class UpdateTest extends ApiTestCase
public function testEmpty() public function testEmpty()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
public function testTooFewArgs() public function testTooFewArgs()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'album' => 'album_name' 'album' => 'album_name'
]); ]);
@ -41,7 +41,7 @@ class UpdateTest extends ApiTestCase
public function testWrongUpdate() public function testWrongUpdate()
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'album' => 'album_name', 'album' => 'album_name',
'album_new' => 'album_name' 'album_new' => 'album_name'
@ -57,7 +57,7 @@ class UpdateTest extends ApiTestCase
{ {
$this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba()); $this->loadFixture(__DIR__ . '/../../../../../datasets/photo/photo.fixture.php', DI::dba());
$response = (new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'album' => 'test_album', 'album' => 'test_album',
'album_new' => 'test_album_2' 'album_new' => 'test_album_2'

View file

@ -18,7 +18,7 @@ class ConfigTest extends ApiTestCase
*/ */
public function testApiStatusnetConfig() public function testApiStatusnetConfig()
{ {
$response = (new Config(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Config(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -16,7 +16,7 @@ class VersionTest extends ApiTestCase
{ {
public function test() public function test()
{ {
$response = (new Version(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Version(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertEquals([ self::assertEquals([

View file

@ -16,7 +16,7 @@ class TestTest extends ApiTestCase
{ {
public function testJson() public function testJson()
{ {
$response = (new Test(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Test(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);
@ -30,7 +30,7 @@ class TestTest extends ApiTestCase
public function testXml() public function testXml()
{ {
$response = (new Test(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml'])) $response = (new Test(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertEquals([ self::assertEquals([

View file

@ -20,7 +20,7 @@ class VerifyCredentialsTest extends ApiTestCase
*/ */
public function testApiAccountVerifyCredentials() public function testApiAccountVerifyCredentials()
{ {
$response = (new VerifyCredentials(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new VerifyCredentials(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -22,7 +22,7 @@ class PushSubscriptionTest extends ApiTestCase
// $this->useHttpMethod(Router::POST); // $this->useHttpMethod(Router::POST);
// //
// $response = (new PushSubscription(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), DI::mstdnSubscription(), DI::mstdnError(), [])) // $response = (new PushSubscription(DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), DI::mstdnSubscription(), DI::mstdnError(), []))
// ->run(); // ->run();
// //
// $json = $this->toJson($response); // $json = $this->toJson($response);

View file

@ -16,7 +16,7 @@ class RateLimitStatusTest extends ApiTestCase
{ {
public function testWithJson() public function testWithJson()
{ {
$response = (new RateLimitStatus(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new RateLimitStatus(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$result = $this->toJson($response); $result = $this->toJson($response);
@ -32,7 +32,7 @@ class RateLimitStatusTest extends ApiTestCase
public function testWithXml() public function testWithXml()
{ {
$response = (new RateLimitStatus(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml'])) $response = (new RateLimitStatus(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'xml']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertEquals([ self::assertEquals([

View file

@ -21,7 +21,7 @@ class UpdateProfileTest extends ApiTestCase
{ {
$this->useHttpMethod(Router::POST); $this->useHttpMethod(Router::POST);
$response = (new UpdateProfile(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new UpdateProfile(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'name' => 'new_name', 'name' => 'new_name',
'description' => 'new_description' 'description' => 'new_description'

View file

@ -18,7 +18,7 @@ class ListsTest extends ApiTestCase
*/ */
public function testApiStatusesFWithBlocks() public function testApiStatusesFWithBlocks()
{ {
$response = (new Lists(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Lists(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -25,7 +25,7 @@ class AllTest extends ApiTestCase
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new All($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new All($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -23,7 +23,7 @@ class ConversationTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new Conversation($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Conversation($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'friendica_verbose' => true, 'friendica_verbose' => true,
]); ]);

View file

@ -31,7 +31,7 @@ class DestroyTest extends ApiTestCase
{ {
$this->expectException(\Friendica\Network\HTTPException\BadRequestException::class); $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
(new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) (new Destroy(DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -42,7 +42,7 @@ class DestroyTest extends ApiTestCase
*/ */
public function testApiDirectMessagesDestroyWithVerbose() public function testApiDirectMessagesDestroyWithVerbose()
{ {
$response = (new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Destroy(DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'friendica_verbose' => true, 'friendica_verbose' => true,
]); ]);
@ -78,7 +78,7 @@ class DestroyTest extends ApiTestCase
public function testApiDirectMessagesDestroyWithId() public function testApiDirectMessagesDestroyWithId()
{ {
$this->expectException(\Friendica\Network\HTTPException\BadRequestException::class); $this->expectException(\Friendica\Network\HTTPException\BadRequestException::class);
(new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) (new Destroy(DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1 'id' => 1
]); ]);
@ -91,7 +91,7 @@ class DestroyTest extends ApiTestCase
*/ */
public function testApiDirectMessagesDestroyWithIdAndVerbose() public function testApiDirectMessagesDestroyWithIdAndVerbose()
{ {
$response = (new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Destroy(DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1, 'id' => 1,
'friendica_parenturi' => 'parent_uri', 'friendica_parenturi' => 'parent_uri',
@ -115,7 +115,7 @@ class DestroyTest extends ApiTestCase
$ids = DBA::selectToArray('mail', ['id']); $ids = DBA::selectToArray('mail', ['id']);
$id = $ids[0]['id']; $id = $ids[0]['id'];
$response = (new Destroy(DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Destroy(DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => $id, 'id' => $id,
'friendica_verbose' => true, 'friendica_verbose' => true,

View file

@ -25,7 +25,7 @@ class InboxTest extends ApiTestCase
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new Inbox($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Inbox($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -31,7 +31,7 @@ class NewDMTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertEmpty((string)$response->getBody()); self::assertEmpty((string)$response->getBody());
@ -63,7 +63,7 @@ class NewDMTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'text' => 'message_text', 'text' => 'message_text',
'user_id' => 43 'user_id' => 43
@ -85,7 +85,7 @@ class NewDMTest extends ApiTestCase
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'text' => 'message_text', 'text' => 'message_text',
'user_id' => 44 'user_id' => 44
@ -109,7 +109,7 @@ class NewDMTest extends ApiTestCase
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'text' => 'message_text', 'text' => 'message_text',
'user_id' => 44, 'user_id' => 44,
@ -135,7 +135,7 @@ class NewDMTest extends ApiTestCase
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss'])) $response = (new NewDM($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'text' => 'message_text', 'text' => 'message_text',
'user_id' => 44, 'user_id' => 44,

View file

@ -23,7 +23,7 @@ class SentTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new Sent($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new Sent($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'friendica_verbose' => true, 'friendica_verbose' => true,
]); ]);
@ -43,7 +43,7 @@ class SentTest extends ApiTestCase
{ {
$directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser());
$response = (new Sent($directMessage, DI::dba(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss'])) $response = (new Sent($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
self::assertXml((string)$response->getBody(), 'direct-messages'); self::assertXml((string)$response->getBody(), 'direct-messages');

View file

@ -32,7 +32,7 @@ class CreateTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Create(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Create(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -43,7 +43,7 @@ class CreateTest extends ApiTestCase
*/ */
public function testApiFavoritesCreateDestroyWithCreateAction() public function testApiFavoritesCreateDestroyWithCreateAction()
{ {
$response = (new Create(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Create(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 3 'id' => 3
]); ]);
@ -60,7 +60,7 @@ class CreateTest extends ApiTestCase
*/ */
public function testApiFavoritesCreateDestroyWithCreateActionAndRss() public function testApiFavoritesCreateDestroyWithCreateActionAndRss()
{ {
$response = (new Create(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS])) $response = (new Create(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS]))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 3 'id' => 3
]); ]);

View file

@ -31,7 +31,7 @@ class DestroyTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -42,7 +42,7 @@ class DestroyTest extends ApiTestCase
*/ */
public function testApiFavoritesCreateDestroyWithDestroyAction() public function testApiFavoritesCreateDestroyWithDestroyAction()
{ {
$response = (new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 3 'id' => 3
]); ]);

View file

@ -8,6 +8,7 @@
namespace Friendica\Test\src\Module\Api\Twitter; namespace Friendica\Test\src\Module\Api\Twitter;
use Friendica\Capabilities\ICanCreateResponses; use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Favorites; use Friendica\Module\Api\Twitter\Favorites;
use Friendica\Test\ApiTestCase; use Friendica\Test\ApiTestCase;
@ -21,7 +22,10 @@ class FavoritesTest extends ApiTestCase
*/ */
public function testApiFavorites() public function testApiFavorites()
{ {
$response = (new Favorites(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Favorites(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'page' => -1, 'page' => -1,
'max_id' => 10, 'max_id' => 10,
@ -41,7 +45,10 @@ class FavoritesTest extends ApiTestCase
*/ */
public function testApiFavoritesWithRss() public function testApiFavoritesWithRss()
{ {
$response = (new Favorites(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Favorites(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
'extension' => ICanCreateResponses::TYPE_RSS 'extension' => ICanCreateResponses::TYPE_RSS
]))->run($this->httpExceptionMock); ]))->run($this->httpExceptionMock);

View file

@ -18,7 +18,7 @@ class ListsTest extends ApiTestCase
*/ */
public function testApiStatusesFWithFollowers() public function testApiStatusesFWithFollowers()
{ {
$response = (new Lists(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Lists(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -20,7 +20,7 @@ class ListsTest extends ApiTestCase
*/ */
public function testApiStatusesFWithFriends() public function testApiStatusesFWithFriends()
{ {
$response = (new Lists(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Lists(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -20,7 +20,7 @@ class IncomingTest extends ApiTestCase
*/ */
public function testApiFriendshipsIncoming() public function testApiFriendshipsIncoming()
{ {
$response = (new Incoming(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Incoming(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);

View file

@ -7,6 +7,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Lists; namespace Friendica\Test\src\Module\Api\Twitter\Lists;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Lists\Statuses; use Friendica\Module\Api\Twitter\Lists\Statuses;
use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\BadRequestException;
@ -23,7 +24,7 @@ class StatusesTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -32,7 +33,10 @@ class StatusesTest extends ApiTestCase
*/ */
public function testApiListsStatusesWithListId() public function testApiListsStatusesWithListId()
{ {
$response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'list_id' => 1, 'list_id' => 1,
'page' => -1, 'page' => -1,
@ -52,7 +56,10 @@ class StatusesTest extends ApiTestCase
*/ */
public function testApiListsStatusesWithListIdAndRss() public function testApiListsStatusesWithListIdAndRss()
{ {
$response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss'])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Statuses(DI::dba(), DI::twitterStatus(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'rss']))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'list_id' => 1 'list_id' => 1
]); ]);

View file

@ -32,7 +32,7 @@ class UploadTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Upload(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Upload(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -46,7 +46,7 @@ class UploadTest extends ApiTestCase
$this->expectException(UnauthorizedException::class); $this->expectException(UnauthorizedException::class);
AuthTestConfig::$authenticated = false; AuthTestConfig::$authenticated = false;
(new Upload(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Upload(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -65,7 +65,7 @@ class UploadTest extends ApiTestCase
] ]
]; ];
(new Upload(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Upload(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -88,7 +88,7 @@ class UploadTest extends ApiTestCase
] ]
]; ];
$response = (new Upload(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Upload(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$media = $this->toJson($response); $media = $this->toJson($response);

View file

@ -16,7 +16,7 @@ class SavedSearchesTest extends ApiTestCase
{ {
public function test() public function test()
{ {
$response = (new SavedSearches(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) $response = (new SavedSearches(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json']))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$result = $this->toJson($response); $result = $this->toJson($response);

View file

@ -31,7 +31,7 @@ class DestroyTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -57,7 +57,7 @@ class DestroyTest extends ApiTestCase
*/ */
public function testApiStatusesDestroyWithId() public function testApiStatusesDestroyWithId()
{ {
$response = (new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1 'id' => 1
]); ]);

View file

@ -21,7 +21,7 @@ class MentionsTest extends ApiTestCase
*/ */
public function testApiStatusesMentions() public function testApiStatusesMentions()
{ {
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'max_id' => 10 'max_id' => 10
]); ]);
@ -39,7 +39,7 @@ class MentionsTest extends ApiTestCase
*/ */
public function testApiStatusesMentionsWithNegativePage() public function testApiStatusesMentionsWithNegativePage()
{ {
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'page' => -2 'page' => -2
]); ]);
@ -71,7 +71,7 @@ class MentionsTest extends ApiTestCase
*/ */
public function testApiStatusesMentionsWithRss() public function testApiStatusesMentionsWithRss()
{ {
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS])) $response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS]))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'page' => -2 'page' => -2
]); ]);

View file

@ -8,6 +8,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Statuses; namespace Friendica\Test\src\Module\Api\Twitter\Statuses;
use Friendica\Capabilities\ICanCreateResponses; use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Statuses\NetworkPublicTimeline; use Friendica\Module\Api\Twitter\Statuses\NetworkPublicTimeline;
use Friendica\Test\ApiTestCase; use Friendica\Test\ApiTestCase;
@ -21,7 +22,10 @@ class NetworkPublicTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesNetworkpublicTimeline() public function testApiStatusesNetworkpublicTimeline()
{ {
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'max_id' => 10 'max_id' => 10
]); ]);
@ -43,7 +47,10 @@ class NetworkPublicTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesNetworkpublicTimelineWithNegativePage() public function testApiStatusesNetworkpublicTimelineWithNegativePage()
{ {
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'page' => -2 'page' => -2
]); ]);
@ -79,7 +86,10 @@ class NetworkPublicTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesNetworkpublicTimelineWithRss() public function testApiStatusesNetworkpublicTimelineWithRss()
{ {
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new NetworkPublicTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
'extension' => ICanCreateResponses::TYPE_RSS 'extension' => ICanCreateResponses::TYPE_RSS
]))->run($this->httpExceptionMock, [ ]))->run($this->httpExceptionMock, [
'page' => -2 'page' => -2

View file

@ -8,6 +8,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Statuses; namespace Friendica\Test\src\Module\Api\Twitter\Statuses;
use Friendica\App\Router; use Friendica\App\Router;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Statuses\Retweet; use Friendica\Module\Api\Twitter\Statuses\Retweet;
use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\BadRequestException;
@ -31,7 +32,7 @@ class RetweetTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Retweet(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Retweet(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -57,7 +58,7 @@ class RetweetTest extends ApiTestCase
*/ */
public function testApiStatusesRepeatWithId() public function testApiStatusesRepeatWithId()
{ {
$response = (new Retweet(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Retweet(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1 'id' => 1
]); ]);
@ -74,7 +75,10 @@ class RetweetTest extends ApiTestCase
*/ */
public function testApiStatusesRepeatWithSharedId() public function testApiStatusesRepeatWithSharedId()
{ {
$response = (new Retweet(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Retweet(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 5 'id' => 5
]); ]);

View file

@ -7,6 +7,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Statuses; namespace Friendica\Test\src\Module\Api\Twitter\Statuses;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Statuses\Show; use Friendica\Module\Api\Twitter\Statuses\Show;
use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\BadRequestException;
@ -24,7 +25,7 @@ class ShowTest extends ApiTestCase
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -35,7 +36,7 @@ class ShowTest extends ApiTestCase
*/ */
public function testApiStatusesShowWithId() public function testApiStatusesShowWithId()
{ {
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1 'id' => 1
]); ]);
@ -53,7 +54,10 @@ class ShowTest extends ApiTestCase
*/ */
public function testApiStatusesShowWithConversation() public function testApiStatusesShowWithConversation()
{ {
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'id' => 1, 'id' => 1,
'conversation' => 1 'conversation' => 1

View file

@ -40,7 +40,7 @@ class UpdateTest extends ApiTestCase
] ]
]; ];
$response = (new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'status' => 'Status content #friendica', 'status' => 'Status content #friendica',
'in_reply_to_status_id' => 0, 'in_reply_to_status_id' => 0,
@ -62,7 +62,7 @@ class UpdateTest extends ApiTestCase
*/ */
public function testApiStatusesUpdateWithHtml() public function testApiStatusesUpdateWithHtml()
{ {
$response = (new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'htmlstatus' => '<b>Status content</b>', 'htmlstatus' => '<b>Status content</b>',
]); ]);

View file

@ -8,6 +8,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Statuses; namespace Friendica\Test\src\Module\Api\Twitter\Statuses;
use Friendica\Capabilities\ICanCreateResponses; use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Statuses\UserTimeline; use Friendica\Module\Api\Twitter\Statuses\UserTimeline;
use Friendica\Test\ApiTestCase; use Friendica\Test\ApiTestCase;
@ -21,7 +22,7 @@ class UserTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesUserTimeline() public function testApiStatusesUserTimeline()
{ {
$response = (new UserTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new UserTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'user_id' => 43, // Public contact id 'user_id' => 43, // Public contact id
'max_id' => 10, 'max_id' => 10,
@ -46,7 +47,10 @@ class UserTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesUserTimelineWithNegativePage() public function testApiStatusesUserTimelineWithNegativePage()
{ {
$response = (new UserTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new UserTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'user_id' => 43, // Public contact id 'user_id' => 43, // Public contact id
'page' => -2, 'page' => -2,
@ -69,7 +73,7 @@ class UserTimelineTest extends ApiTestCase
*/ */
public function testApiStatusesUserTimelineWithRss() public function testApiStatusesUserTimelineWithRss()
{ {
$response = (new UserTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ $response = (new UserTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
'extension' => ICanCreateResponses::TYPE_RSS 'extension' => ICanCreateResponses::TYPE_RSS
]))->run($this->httpExceptionMock); ]))->run($this->httpExceptionMock);

View file

@ -7,6 +7,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Users; namespace Friendica\Test\src\Module\Api\Twitter\Users;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Users\Lookup; use Friendica\Module\Api\Twitter\Users\Lookup;
use Friendica\Network\HTTPException\NotFoundException; use Friendica\Network\HTTPException\NotFoundException;
@ -23,7 +24,7 @@ class LookupTest extends ApiTestCase
{ {
$this->expectException(NotFoundException::class); $this->expectException(NotFoundException::class);
(new Lookup(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Lookup(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
@ -34,7 +35,10 @@ class LookupTest extends ApiTestCase
*/ */
public function testApiUsersLookupWithUserId() public function testApiUsersLookupWithUserId()
{ {
$response = (new Lookup(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Lookup(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'user_id' => static::OTHER_USER['id'] 'user_id' => static::OTHER_USER['id']
]); ]);

View file

@ -8,6 +8,7 @@
namespace Friendica\Test\src\Module\Api\Twitter\Users; namespace Friendica\Test\src\Module\Api\Twitter\Users;
use Friendica\Capabilities\ICanCreateResponses; use Friendica\Capabilities\ICanCreateResponses;
use Friendica\Core\Renderer;
use Friendica\DI; use Friendica\DI;
use Friendica\Module\Api\Twitter\Users\Search; use Friendica\Module\Api\Twitter\Users\Search;
use Friendica\Network\HTTPException\BadRequestException; use Friendica\Network\HTTPException\BadRequestException;
@ -22,7 +23,10 @@ class SearchTest extends ApiTestCase
*/ */
public function testApiUsersSearch() public function testApiUsersSearch()
{ {
$response = (new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Search(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock, [ ->run($this->httpExceptionMock, [
'q' => static::OTHER_USER['name'] 'q' => static::OTHER_USER['name']
]); ]);
@ -39,7 +43,10 @@ class SearchTest extends ApiTestCase
*/ */
public function testApiUsersSearchWithXml() public function testApiUsersSearchWithXml()
{ {
$response = (new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ // @todo: This call is needed for this test
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
$response = (new Search(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
'extension' => ICanCreateResponses::TYPE_XML 'extension' => ICanCreateResponses::TYPE_XML
]))->run($this->httpExceptionMock, [ ]))->run($this->httpExceptionMock, [
'q' => static::OTHER_USER['name'] 'q' => static::OTHER_USER['name']
@ -57,7 +64,7 @@ class SearchTest extends ApiTestCase
{ {
$this->expectException(BadRequestException::class); $this->expectException(BadRequestException::class);
(new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) (new Search(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
} }
} }

View file

@ -21,7 +21,7 @@ class ShowTest extends ApiTestCase
*/ */
public function testApiUsersShow() public function testApiUsersShow()
{ {
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [])) $response = (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
->run($this->httpExceptionMock); ->run($this->httpExceptionMock);
$json = $this->toJson($response); $json = $this->toJson($response);
@ -41,7 +41,7 @@ class ShowTest extends ApiTestCase
*/ */
public function testApiUsersShowWithXml() public function testApiUsersShowWithXml()
{ {
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [ $response = (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
'extension' => ICanCreateResponses::TYPE_XML 'extension' => ICanCreateResponses::TYPE_XML
]))->run($this->httpExceptionMock); ]))->run($this->httpExceptionMock);