mirror of
https://github.com/friendica/friendica
synced 2024-12-31 22:42:21 +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;
|
namespace Friendica\Test\src\Factory\Api\Twitter;
|
||||||
|
|
||||||
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Factory\Api\Friendica\Activities;
|
use Friendica\Factory\Api\Friendica\Activities;
|
||||||
use Friendica\Factory\Api\Twitter\Attachment;
|
use Friendica\Factory\Api\Twitter\Attachment;
|
||||||
|
@ -123,10 +124,8 @@ class StatusTest extends FixtureTest
|
||||||
*/
|
*/
|
||||||
public function testApiFormatItems()
|
public function testApiFormatItems()
|
||||||
{
|
{
|
||||||
// FIXME: We are calling DI::app() here so Friendica\App::load() will be called.
|
// This call is needed for this test
|
||||||
// This will call Friendica\Core\Renderer::registerTemplateEngine() which is needed for this tests.
|
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||||
// This side effect MUST be eliminated.
|
|
||||||
DI::app();
|
|
||||||
|
|
||||||
$posts = DI::dba()->selectToArray('post-view', ['uri-id']);
|
$posts = DI::dba()->selectToArray('post-view', ['uri-id']);
|
||||||
foreach ($posts as $item) {
|
foreach ($posts as $item) {
|
||||||
|
|
Loading…
Reference in a new issue