Enhanced ListDomainsAction so that it returns default redirects in the response

This commit is contained in:
Alejandro Celaya
2021-12-09 12:11:09 +01:00
parent 0b22fb933c
commit 348ac78f5a
7 changed files with 43 additions and 25 deletions

View File

@@ -22,11 +22,13 @@ class ListDomainsActionTest extends TestCase
private ListDomainsAction $action;
private ObjectProphecy $domainService;
private NotFoundRedirectOptions $options;
public function setUp(): void
{
$this->domainService = $this->prophesize(DomainServiceInterface::class);
$this->action = new ListDomainsAction($this->domainService->reveal());
$this->options = new NotFoundRedirectOptions();
$this->action = new ListDomainsAction($this->domainService->reveal(), $this->options);
}
/** @test */
@@ -46,6 +48,7 @@ class ListDomainsActionTest extends TestCase
self::assertEquals([
'domains' => [
'data' => $domains,
'defaultRedirects' => $this->options,
],
], $payload);
$listDomains->shouldHaveBeenCalledOnce();