Add newly required constructor parameter to BaseApi-related tests
This commit is contained in:
@@ -38,7 +38,7 @@ class LookupTest extends ApiTest
|
||||
{
|
||||
$this->expectException(NotFoundException::class);
|
||||
|
||||
(new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
(new Lookup(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class LookupTest extends ApiTest
|
||||
*/
|
||||
public function testApiUsersLookupWithUserId()
|
||||
{
|
||||
$response = (new Lookup(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Lookup(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'user_id' => static::OTHER_USER['id']
|
||||
]);
|
||||
|
||||
@@ -37,7 +37,7 @@ class SearchTest extends ApiTest
|
||||
*/
|
||||
public function testApiUsersSearch()
|
||||
{
|
||||
$response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock, [
|
||||
'q' => static::OTHER_USER['name']
|
||||
]);
|
||||
@@ -54,7 +54,7 @@ class SearchTest extends ApiTest
|
||||
*/
|
||||
public function testApiUsersSearchWithXml()
|
||||
{
|
||||
$response = (new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
$response = (new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
'extension' => ICanCreateResponses::TYPE_XML
|
||||
]))->run($this->httpExceptionMock, [
|
||||
'q' => static::OTHER_USER['name']
|
||||
@@ -72,7 +72,7 @@ class SearchTest extends ApiTest
|
||||
{
|
||||
$this->expectException(BadRequestException::class);
|
||||
|
||||
(new Search(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
(new Search(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class ShowTest extends ApiTest
|
||||
*/
|
||||
public function testApiUsersShow()
|
||||
{
|
||||
$response = (new Show(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), []))
|
||||
->run($this->httpExceptionMock);
|
||||
|
||||
$json = $this->toJson($response);
|
||||
@@ -56,7 +56,7 @@ class ShowTest extends ApiTest
|
||||
*/
|
||||
public function testApiUsersShowWithXml()
|
||||
{
|
||||
$response = (new Show(DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
$response = (new Show(DI::mstdnError(), DI::app(), DI::l10n(), DI::baseUrl(), DI::args(), DI::logger(), DI::profiler(), DI::apiResponse(), [], [
|
||||
'extension' => ICanCreateResponses::TYPE_XML
|
||||
]))->run($this->httpExceptionMock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user