Introduce Response for Modules to create a testable way for module responses

This commit is contained in:
Philipp 2021-11-21 20:06:36 +01:00
parent ad5b0762b0
commit 561aba18e3
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
37 changed files with 309 additions and 113 deletions

View file

@ -37,11 +37,11 @@ class Index extends BaseModule
{
protected function rawContent(array $request = [])
{
(new Profile($this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->server, $this->parameters))->rawContent();
(new Profile($this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent();
}
protected function content(array $request = []): string
{
return (new Status($this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->server, $this->parameters))->content();
return (new Status($this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content();
}
}