mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-11 05:44:29 +02:00
Replace DI::app() with DI::appHelper() in more tests
This commit is contained in:
parent
b2a383a9cb
commit
ba65cad1cd
31 changed files with 56 additions and 56 deletions
|
@ -31,7 +31,7 @@ class DestroyTest extends ApiTestCase
|
|||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
|
||||
(new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
(new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class DestroyTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesDestroyWithId()
|
||||
{
|
||||
$response = (new Destroy(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Destroy(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'id' => 1
|
||||
]);
|
||||
|
|
|
@ -21,7 +21,7 @@ class MentionsTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesMentions()
|
||||
{
|
||||
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'max_id' => 10
|
||||
]);
|
||||
|
@ -39,7 +39,7 @@ class MentionsTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesMentionsWithNegativePage()
|
||||
{
|
||||
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'page' => -2
|
||||
]);
|
||||
|
@ -71,7 +71,7 @@ class MentionsTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesMentionsWithRss()
|
||||
{
|
||||
$response = (new Mentions(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS]))
|
||||
$response = (new Mentions(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], ['extension' => ICanCreateResponses::TYPE_RSS]))
|
||||
->run($this->httpExceptionMock, [
|
||||
'page' => -2
|
||||
]);
|
||||
|
|
|
@ -31,7 +31,7 @@ class RetweetTest extends ApiTestCase
|
|||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
|
||||
(new Retweet(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
(new Retweet(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class RetweetTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesRepeatWithId()
|
||||
{
|
||||
$response = (new Retweet(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Retweet(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'id' => 1
|
||||
]);
|
||||
|
|
|
@ -24,7 +24,7 @@ class ShowTest extends ApiTestCase
|
|||
$this->expectException(BadRequestException::class);
|
||||
|
||||
|
||||
(new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
(new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ class ShowTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesShowWithId()
|
||||
{
|
||||
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Show(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'id' => 1
|
||||
]);
|
||||
|
|
|
@ -40,7 +40,7 @@ class UpdateTest extends ApiTestCase
|
|||
]
|
||||
];
|
||||
|
||||
$response = (new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'status' => 'Status content #friendica',
|
||||
'in_reply_to_status_id' => 0,
|
||||
|
@ -62,7 +62,7 @@ class UpdateTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesUpdateWithHtml()
|
||||
{
|
||||
$response = (new Update(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Update(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'htmlstatus' => '<b>Status content</b>',
|
||||
]);
|
||||
|
|
|
@ -21,7 +21,7 @@ class UserTimelineTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesUserTimeline()
|
||||
{
|
||||
$response = (new UserTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new UserTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'user_id' => 43, // Public contact id
|
||||
'max_id' => 10,
|
||||
|
@ -69,7 +69,7 @@ class UserTimelineTest extends ApiTestCase
|
|||
*/
|
||||
public function testApiStatusesUserTimelineWithRss()
|
||||
{
|
||||
$response = (new UserTimeline(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
$response = (new UserTimeline(DI::mstdnError(), DI::appHelper(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
'extension' => ICanCreateResponses::TYPE_RSS
|
||||
]))->run($this->httpExceptionMock);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue