refactor(arch): enforce gateway compliance and remove service-wrapping gateways

This commit is contained in:
2026-03-13 11:31:33 +01:00
parent 082fa4c9a5
commit 892da0048d
96 changed files with 1117 additions and 1060 deletions

View File

@@ -3,8 +3,8 @@
namespace MintyPHP\Tests\Service\Auth;
use MintyPHP\Http\SessionStore;
use MintyPHP\Service\Auth\AuthSavedFilterGateway;
use MintyPHP\Service\Auth\AuthSessionTenantContextService;
use MintyPHP\Service\User\UserSavedFilterService;
use MintyPHP\Service\User\UserTenantContextService;
use PHPUnit\Framework\TestCase;
@@ -24,8 +24,8 @@ class AuthSessionTenantContextServiceTest extends TestCase
$userTenantContextService->method('getAvailableDepartmentsByTenant')->willReturn([]);
$userTenantContextService->expects($this->never())->method('getCurrentTenant');
$savedFilterGateway = $this->createMock(AuthSavedFilterGateway::class);
$savedFilterGateway->method('listAddressBookFilters')->willReturn([]);
$savedFilterGateway = $this->createMock(UserSavedFilterService::class);
$savedFilterGateway->method('listForAddressBook')->willReturn([]);
$service = new AuthSessionTenantContextService(
$userTenantContextService,
@@ -56,8 +56,8 @@ class AuthSessionTenantContextServiceTest extends TestCase
$userTenantContextService->method('getAvailableDepartmentsByTenant')->willReturn($availableDepartments);
$userTenantContextService->method('getCurrentTenant')->willReturn(null);
$savedFilterGateway = $this->createMock(AuthSavedFilterGateway::class);
$savedFilterGateway->method('listAddressBookFilters')->willReturn($savedFilters);
$savedFilterGateway = $this->createMock(UserSavedFilterService::class);
$savedFilterGateway->method('listForAddressBook')->willReturn($savedFilters);
$service = new AuthSessionTenantContextService(
$userTenantContextService,
@@ -90,8 +90,8 @@ class AuthSessionTenantContextServiceTest extends TestCase
$userTenantContextService->method('getAvailableDepartmentsByTenant')->willReturn([]);
$userTenantContextService->method('getCurrentTenant')->willReturn($availableTenants[0]);
$savedFilterGateway = $this->createMock(AuthSavedFilterGateway::class);
$savedFilterGateway->method('listAddressBookFilters')->willReturn([]);
$savedFilterGateway = $this->createMock(UserSavedFilterService::class);
$savedFilterGateway->method('listForAddressBook')->willReturn([]);
$service = new AuthSessionTenantContextService(
$userTenantContextService,