Stabilize service suite hygiene
This commit is contained in:
@@ -18,6 +18,31 @@ use PHPUnit\Framework\TestCase;
|
|||||||
|
|
||||||
class AuthServiceTest extends TestCase
|
class AuthServiceTest extends TestCase
|
||||||
{
|
{
|
||||||
|
private array $previousSession = [];
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
$this->previousSession = $_SESSION ?? [];
|
||||||
|
|
||||||
|
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function tearDown(): void
|
||||||
|
{
|
||||||
|
$_SESSION = $this->previousSession;
|
||||||
|
|
||||||
|
if (session_status() === PHP_SESSION_ACTIVE) {
|
||||||
|
session_write_close();
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// canLoginToTenant
|
// canLoginToTenant
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class MailServiceTest extends TestCase
|
|||||||
->method('markFailed')
|
->method('markFailed')
|
||||||
->with(
|
->with(
|
||||||
$this->identicalTo(5),
|
$this->identicalTo(5),
|
||||||
$this->isType('string'),
|
$this->isString(),
|
||||||
);
|
);
|
||||||
|
|
||||||
$service = $this->newService(mailLogRepository: $mailLogRepository);
|
$service = $this->newService(mailLogRepository: $mailLogRepository);
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ class UserLifecycleServiceTest extends TestCase
|
|||||||
$this->auditService->expects($this->once())
|
$this->auditService->expects($this->once())
|
||||||
->method('logDeactivate')
|
->method('logDeactivate')
|
||||||
->with(
|
->with(
|
||||||
$this->isType('string'),
|
$this->isString(),
|
||||||
'manual',
|
'manual',
|
||||||
$this->isType('array'),
|
$this->isArray(),
|
||||||
99,
|
99,
|
||||||
$user7,
|
$user7,
|
||||||
'success',
|
'success',
|
||||||
|
|||||||
Reference in New Issue
Block a user