Introduce Response for Modules to create a testable way for module responses
This commit is contained in:
@@ -32,6 +32,7 @@ use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseNotifications;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Navigation\Notifications\Factory\Introduction as IntroductionFactory;
|
||||
use Friendica\Navigation\Notifications\ValueObject\Introduction;
|
||||
use Friendica\Util\Profiler;
|
||||
@@ -47,9 +48,9 @@ class Introductions extends BaseNotifications
|
||||
/** @var Mode */
|
||||
protected $mode;
|
||||
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Mode $mode, IntroductionFactory $notificationIntro, array $server, array $parameters = [])
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Mode $mode, IntroductionFactory $notificationIntro, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $server, $parameters);
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->notificationIntro = $notificationIntro;
|
||||
$this->mode = $mode;
|
||||
|
||||
@@ -27,6 +27,7 @@ use Friendica\Content\Nav;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Module\BaseNotifications;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Navigation\Notifications\ValueObject\FormattedNotification;
|
||||
use Friendica\Util\Profiler;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -43,9 +44,9 @@ class Notifications extends BaseNotifications
|
||||
/** @var \Friendica\Navigation\Notifications\Factory\FormattedNotification */
|
||||
protected $formattedNotificationFactory;
|
||||
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, \Friendica\Navigation\Notifications\Factory\FormattedNotification $formattedNotificationFactory, array $server, array $parameters = [])
|
||||
public function __construct(L10n $l10n, App\BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, \Friendica\Navigation\Notifications\Factory\FormattedNotification $formattedNotificationFactory, array $server, array $parameters = [])
|
||||
{
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $server, $parameters);
|
||||
parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters);
|
||||
|
||||
$this->formattedNotificationFactory = $formattedNotificationFactory;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user