]> git.mxchange.org Git - friendica.git/commitdiff
Fix tests for now because of side effect in Friendica\App class
authorArt4 <art4@wlabs.de>
Sat, 16 Nov 2024 10:21:29 +0000 (10:21 +0000)
committerArt4 <art4@wlabs.de>
Sat, 16 Nov 2024 10:21:29 +0000 (10:21 +0000)
tests/src/Factory/Api/Twitter/StatusTest.php

index c2289ddb3c1764b4f493bdf3e28ba335ac1aa67b..06e762c9f01d9795140636c7bab8efda31b0d4dd 100644 (file)
@@ -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