forked from fa/breadcrumb-the-shire
Stabilize service suite hygiene
This commit is contained in:
@@ -18,6 +18,31 @@ use PHPUnit\Framework\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
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -123,7 +123,7 @@ class MailServiceTest extends TestCase
|
||||
->method('markFailed')
|
||||
->with(
|
||||
$this->identicalTo(5),
|
||||
$this->isType('string'),
|
||||
$this->isString(),
|
||||
);
|
||||
|
||||
$service = $this->newService(mailLogRepository: $mailLogRepository);
|
||||
|
||||
@@ -219,9 +219,9 @@ class UserLifecycleServiceTest extends TestCase
|
||||
$this->auditService->expects($this->once())
|
||||
->method('logDeactivate')
|
||||
->with(
|
||||
$this->isType('string'),
|
||||
$this->isString(),
|
||||
'manual',
|
||||
$this->isType('array'),
|
||||
$this->isArray(),
|
||||
99,
|
||||
$user7,
|
||||
'success',
|
||||
|
||||
Reference in New Issue
Block a user