mirror of
https://github.com/friendica/friendica
synced 2024-12-22 14:40:16 +00:00
Remove App dependency in test
This commit is contained in:
parent
551cb5f50f
commit
d2ea53deb1
1 changed files with 3 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
namespace Friendica\Test\src\Factory\Api\Twitter;
|
||||
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Factory\Api\Friendica\Activities;
|
||||
use Friendica\Factory\Api\Twitter\Attachment;
|
||||
|
@ -123,10 +124,8 @@ 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();
|
||||
// This call is needed for this test
|
||||
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||
|
||||
$posts = DI::dba()->selectToArray('post-view', ['uri-id']);
|
||||
foreach ($posts as $item) {
|
||||
|
|
Loading…
Reference in a new issue