agent foundation
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace MintyPHP\Tests\Service\Import;
|
||||
|
||||
use MintyPHP\Http\SessionStoreInterface;
|
||||
use MintyPHP\Service\Access\PermissionGateway;
|
||||
use MintyPHP\Service\Audit\ImportAuditService;
|
||||
use MintyPHP\Service\Import\CsvReaderService;
|
||||
@@ -9,7 +10,7 @@ use MintyPHP\Service\Import\ImportService;
|
||||
use MintyPHP\Service\Import\ImportStateStoreService;
|
||||
use MintyPHP\Service\Import\ImportTempFileService;
|
||||
use MintyPHP\Service\Import\Profile\ImportProfileInterface;
|
||||
use MintyPHP\Service\Settings\SettingGateway;
|
||||
use MintyPHP\Service\Settings\SettingsDefaultsGateway;
|
||||
use MintyPHP\Service\User\UserScopeGateway;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
@@ -120,10 +121,12 @@ class ImportServiceTest extends TestCase
|
||||
$stateStore = $stateStore ?? $this->createMock(ImportStateStoreService::class);
|
||||
$permissionGateway = $this->createMock(PermissionGateway::class);
|
||||
$permissionGateway->method('userHas')->willReturn(false);
|
||||
$settingGateway = $this->createMock(SettingGateway::class);
|
||||
$settingsDefaultsGateway = $this->createMock(SettingsDefaultsGateway::class);
|
||||
$userScopeGateway = $this->createMock(UserScopeGateway::class);
|
||||
$userScopeGateway->method('hasGlobalAccess')->willReturn(false);
|
||||
$userScopeGateway->method('getUserTenantIds')->willReturn([]);
|
||||
$sessionStore = $this->createMock(SessionStoreInterface::class);
|
||||
$sessionStore->method('get')->willReturn([]);
|
||||
|
||||
return new ImportService(
|
||||
$csvReader,
|
||||
@@ -132,8 +135,9 @@ class ImportServiceTest extends TestCase
|
||||
$stateStore,
|
||||
[$profile->key() => $profile],
|
||||
$permissionGateway,
|
||||
$settingGateway,
|
||||
$userScopeGateway
|
||||
$settingsDefaultsGateway,
|
||||
$userScopeGateway,
|
||||
$sessionStore
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user