Release 2.12 (#4609)

This commit is contained in:
Kevin Papst
2024-02-07 23:47:25 +01:00
committed by GitHub
parent 7abe787778
commit 85a16a9363
394 changed files with 1189 additions and 6735 deletions

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface
*/
class AclDecisionManagerTest extends TestCase
{
public function testFullyAuthenticated()
public function testFullyAuthenticated(): void
{
$manager = $this->createMock(AccessDecisionManagerInterface::class);
$manager->expects($this->once())->method('decide')->willReturn(true);
@@ -31,7 +31,7 @@ class AclDecisionManagerTest extends TestCase
self::assertTrue($result);
}
public function testIsNotFullyAuthenticated()
public function testIsNotFullyAuthenticated(): void
{
$manager = $this->createMock(AccessDecisionManagerInterface::class);
$manager->expects($this->once())->method('decide')->willReturn(false);

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Cache\Adapter\ArrayAdapter;
*/
class RolePermissionManagerTest extends TestCase
{
public function testWithEmptyRepository()
public function testWithEmptyRepository(): void
{
$repository = $this->getMockBuilder(RolePermissionRepository::class)->onlyMethods(['getAllAsArray'])->disableOriginalConstructor()->getMock();
$repository->method('getAllAsArray')->willReturn([]);
@@ -34,7 +34,7 @@ class RolePermissionManagerTest extends TestCase
self::assertFalse($sut->hasPermission('TEST_ROLE', 'foo'));
}
public function testWithRepositoryData()
public function testWithRepositoryData(): void
{
$repository = $this->getMockBuilder(RolePermissionRepository::class)->onlyMethods(['getAllAsArray'])->disableOriginalConstructor()->getMock();
$repository->method('getAllAsArray')->willReturn([
@@ -57,7 +57,7 @@ class RolePermissionManagerTest extends TestCase
self::assertTrue($sut->hasPermission('USER_ROLE', 'bar'));
}
public function testWithConfigData()
public function testWithConfigData(): void
{
$repository = $this->getMockBuilder(RolePermissionRepository::class)->onlyMethods(['getAllAsArray'])->disableOriginalConstructor()->getMock();
$repository->method('getAllAsArray')->willReturn([]);
@@ -76,7 +76,7 @@ class RolePermissionManagerTest extends TestCase
self::assertTrue($sut->hasPermission('USER_ROLE', 'bar'));
}
public function testWithMixedData()
public function testWithMixedData(): void
{
$repository = $this->getMockBuilder(RolePermissionRepository::class)->onlyMethods(['getAllAsArray'])->disableOriginalConstructor()->getMock();
$repository->method('getAllAsArray')->willReturn([

View File

@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
*/
class RoleServiceTest extends TestCase
{
public function testWithEmptyRepository()
public function testWithEmptyRepository(): void
{
$real = [
'ROLE_USER',
@@ -35,7 +35,7 @@ class RoleServiceTest extends TestCase
self::assertEquals($real, $sut->getSystemRoles());
}
public function testWithRepositoryData()
public function testWithRepositoryData(): void
{
$real = [
'ROLE_TEAMLEAD',

View File

@@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase;
*/
class SessionHandlerTest extends TestCase
{
public function testConstruct()
public function testConstruct(): void
{
$sut = new SessionHandler($this->createMock(Connection::class));

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Security\Core\Exception\DisabledException;
*/
class UserCheckerTest extends TestCase
{
public function testCheckPreAuthReturnsOnUnknownUserClass()
public function testCheckPreAuthReturnsOnUnknownUserClass(): void
{
$sut = new UserChecker();
@@ -31,7 +31,7 @@ class UserCheckerTest extends TestCase
$this->assertTrue(true);
}
public function testCheckPostAuthReturnsOnUnknownUserClass()
public function testCheckPostAuthReturnsOnUnknownUserClass(): void
{
$sut = new UserChecker();
@@ -43,7 +43,7 @@ class UserCheckerTest extends TestCase
$this->assertTrue(true);
}
public function testDisabledCannotLoginInCheckPreAuth()
public function testDisabledCannotLoginInCheckPreAuth(): void
{
$this->expectException(DisabledException::class);
$this->expectExceptionMessage('User account is disabled.');
@@ -51,7 +51,7 @@ class UserCheckerTest extends TestCase
(new UserChecker())->checkPreAuth((new User())->setEnabled(false));
}
public function testDisabledCannotLoginInCheckPostAuth()
public function testDisabledCannotLoginInCheckPostAuth(): void
{
$this->expectException(DisabledException::class);
$this->expectExceptionMessage('User account is disabled.');