diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index c18d6838ce..5a00d5177f 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -124,7 +124,7 @@ class StatusTest extends FixtureTestCase */ public function testApiFormatItems() { - // This call is needed for this test + // @todo: This call is needed for this test Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine'); $posts = DI::dba()->selectToArray('post-view', ['uri-id']); diff --git a/tests/src/Module/Api/Twitter/FavoritesTest.php b/tests/src/Module/Api/Twitter/FavoritesTest.php index 1999ffe93e..7734a6c629 100644 --- a/tests/src/Module/Api/Twitter/FavoritesTest.php +++ b/tests/src/Module/Api/Twitter/FavoritesTest.php @@ -8,6 +8,7 @@ namespace Friendica\Test\src\Module\Api\Twitter; use Friendica\Capabilities\ICanCreateResponses; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Favorites; use Friendica\Test\ApiTestCase; @@ -21,7 +22,10 @@ class FavoritesTest extends ApiTestCase */ 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, [ 'page' => -1, 'max_id' => 10, @@ -41,7 +45,10 @@ class FavoritesTest extends ApiTestCase */ 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 ]))->run($this->httpExceptionMock); diff --git a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php index c4865b70ca..add9bbe6d2 100644 --- a/tests/src/Module/Api/Twitter/Lists/StatusesTest.php +++ b/tests/src/Module/Api/Twitter/Lists/StatusesTest.php @@ -7,6 +7,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Lists; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Lists\Statuses; use Friendica\Network\HTTPException\BadRequestException; @@ -32,7 +33,10 @@ class StatusesTest extends ApiTestCase */ 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, [ 'list_id' => 1, 'page' => -1, @@ -52,7 +56,10 @@ class StatusesTest extends ApiTestCase */ 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, [ 'list_id' => 1 ]); diff --git a/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php b/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php index 9047f94683..52db7b76de 100644 --- a/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/NetworkPublicTimelineTest.php @@ -8,6 +8,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; use Friendica\Capabilities\ICanCreateResponses; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\NetworkPublicTimeline; use Friendica\Test\ApiTestCase; @@ -21,7 +22,10 @@ class NetworkPublicTimelineTest extends ApiTestCase */ 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, [ 'max_id' => 10 ]); @@ -43,7 +47,10 @@ class NetworkPublicTimelineTest extends ApiTestCase */ 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, [ 'page' => -2 ]); @@ -79,7 +86,10 @@ class NetworkPublicTimelineTest extends ApiTestCase */ 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 ]))->run($this->httpExceptionMock, [ 'page' => -2 diff --git a/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php b/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php index 9ce207f45c..b8a7a50428 100644 --- a/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/RetweetTest.php @@ -8,6 +8,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; use Friendica\App\Router; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Retweet; use Friendica\Network\HTTPException\BadRequestException; @@ -74,7 +75,10 @@ class RetweetTest extends ApiTestCase */ 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, [ 'id' => 5 ]); diff --git a/tests/src/Module/Api/Twitter/Statuses/ShowTest.php b/tests/src/Module/Api/Twitter/Statuses/ShowTest.php index c7b09cec6d..68df218a32 100644 --- a/tests/src/Module/Api/Twitter/Statuses/ShowTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/ShowTest.php @@ -7,6 +7,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\Show; use Friendica\Network\HTTPException\BadRequestException; @@ -53,7 +54,10 @@ class ShowTest extends ApiTestCase */ 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, [ 'id' => 1, 'conversation' => 1 diff --git a/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php b/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php index ea2ba48f33..aeadede16c 100644 --- a/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php +++ b/tests/src/Module/Api/Twitter/Statuses/UserTimelineTest.php @@ -8,6 +8,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Statuses; use Friendica\Capabilities\ICanCreateResponses; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Statuses\UserTimeline; use Friendica\Test\ApiTestCase; @@ -46,7 +47,10 @@ class UserTimelineTest extends ApiTestCase */ 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, [ 'user_id' => 43, // Public contact id 'page' => -2, diff --git a/tests/src/Module/Api/Twitter/Users/LookupTest.php b/tests/src/Module/Api/Twitter/Users/LookupTest.php index 509767c2ea..aa53cce5cb 100644 --- a/tests/src/Module/Api/Twitter/Users/LookupTest.php +++ b/tests/src/Module/Api/Twitter/Users/LookupTest.php @@ -7,6 +7,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Users; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Users\Lookup; use Friendica\Network\HTTPException\NotFoundException; @@ -34,7 +35,10 @@ class LookupTest extends ApiTestCase */ 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, [ 'user_id' => static::OTHER_USER['id'] ]); diff --git a/tests/src/Module/Api/Twitter/Users/SearchTest.php b/tests/src/Module/Api/Twitter/Users/SearchTest.php index 42ad97dec9..c5996a5345 100644 --- a/tests/src/Module/Api/Twitter/Users/SearchTest.php +++ b/tests/src/Module/Api/Twitter/Users/SearchTest.php @@ -8,6 +8,7 @@ namespace Friendica\Test\src\Module\Api\Twitter\Users; use Friendica\Capabilities\ICanCreateResponses; +use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Module\Api\Twitter\Users\Search; use Friendica\Network\HTTPException\BadRequestException; @@ -22,7 +23,10 @@ class SearchTest extends ApiTestCase */ 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, [ 'q' => static::OTHER_USER['name'] ]); @@ -39,7 +43,10 @@ class SearchTest extends ApiTestCase */ 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 ]))->run($this->httpExceptionMock, [ 'q' => static::OTHER_USER['name']