Upgrade tests to PhpUnit 10 (#5252)

This commit is contained in:
Kevin Papst
2024-12-22 01:25:30 +01:00
committed by GitHub
parent 9bd37fb695
commit c7f0508707
377 changed files with 3308 additions and 3409 deletions

View File

@@ -36,7 +36,7 @@ class PromoteUserCommandTest extends KernelTestCase
$container = self::$kernel->getContainer();
$userService = $container->get(UserService::class);
$this->assertInstanceOf(UserService::class, $userService);
self::assertInstanceOf(UserService::class, $userService);
$this->application->add(new PromoteUserCommand($userService));
}
@@ -79,7 +79,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', 'ROLE_TEAMLEAD');
$output = $commandTester->getDisplay();
$this->assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been added to user "john_user".', $output);
self::assertStringContainsString('[OK] Role "ROLE_TEAMLEAD" has been added to user "john_user".', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -96,7 +96,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('john_user', null, true);
$output = $commandTester->getDisplay();
$this->assertStringContainsString('[OK] User "john_user" has been promoted as a super administrator.', $output);
self::assertStringContainsString('[OK] User "john_user" has been promoted as a super administrator.', $output);
$container = self::$kernel->getContainer();
/** @var Registry $doctrine */
@@ -113,7 +113,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('susan_super', null, true);
$output = $commandTester->getDisplay();
$this->assertStringContainsString('[WARNING] User "susan_super" does already have the super administrator role.', $output);
self::assertStringContainsString('[WARNING] User "susan_super" does already have the super administrator role.', $output);
}
public function testPromoteTeamleadFailsOnTeamlead(): void
@@ -121,7 +121,7 @@ class PromoteUserCommandTest extends KernelTestCase
$commandTester = $this->callCommand('tony_teamlead', 'ROLE_TEAMLEAD', false);
$output = $commandTester->getDisplay();
$this->assertStringContainsString('[WARNING] User "tony_teamlead" did already have "ROLE_TEAMLEAD" role.', $output);
self::assertStringContainsString('[WARNING] User "tony_teamlead" did already have "ROLE_TEAMLEAD" role.', $output);
}
public function testPromoteRoleAndSuperFails(): void