From 1f2c97f76f10f4340188b8297c50de97887f1594 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 16 Nov 2024 10:21:29 +0000 Subject: [PATCH] Fix tests for now because of side effect in Friendica\App class --- tests/src/Factory/Api/Twitter/StatusTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/src/Factory/Api/Twitter/StatusTest.php b/tests/src/Factory/Api/Twitter/StatusTest.php index c2289ddb3c..06e762c9f0 100644 --- a/tests/src/Factory/Api/Twitter/StatusTest.php +++ b/tests/src/Factory/Api/Twitter/StatusTest.php @@ -123,6 +123,11 @@ class StatusTest extends FixtureTest */ public function testApiFormatItems() { + // FIXME: We are calling DI::app() here so Friendica\App::load() will be called. + // This will call Friendica\Core\Renderer::registerTemplateEngine() which is needed for this tests. + // This side effect MUST be eliminated. + DI::app(); + $posts = DI::dba()->selectToArray('post-view', ['uri-id']); foreach ($posts as $item) { $status = $this->statusFactory