loadFixture(__DIR__ . '/../../../../../datasets/mail/mail.fixture.php', DI::dba()); $directMessage = new DirectMessage(DI::logger(), DI::dba(), DI::twitterUser()); $response = (new Inbox($directMessage, DI::dba(), DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => 'json'])) ->run($this->httpExceptionMock); $json = $this->toJson($response); self::assertGreaterThan(0, count($json)); foreach ($json as $item) { self::assertIsInt($item->id); self::assertIsString($item->text); } } }