Skip to content

Commit e6aa01a

Browse files
committed
Update command tests to avoid deprecated APIs
1 parent 7b0dca3 commit e6aa01a

6 files changed

Lines changed: 6 additions & 6 deletions

tests/Command/ActivateUserCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private function createCommandTester(UserManipulator $manipulator, ?Application
6767

6868
$command = new ActivateUserCommand($manipulator);
6969

70-
$application->add($command);
70+
$application->addCommands([$command]);
7171

7272
return new CommandTester($application->find('fos:user:activate'));
7373
}

tests/Command/ChangePasswordCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function createCommandTester(UserManipulator $userManipulator, ?Applicat
6868

6969
$command = new ChangePasswordCommand($userManipulator);
7070

71-
$application->add($command);
71+
$application->addCommands([$command]);
7272

7373
return new CommandTester($application->find('fos:user:change-password'));
7474
}

tests/Command/CreateUserCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private function createCommandTester(UserManipulator $manipulator, ?Application
7171

7272
$command = new CreateUserCommand($manipulator);
7373

74-
$application->add($command);
74+
$application->addCommands([$command]);
7575

7676
return new CommandTester($application->find('fos:user:create'));
7777
}

tests/Command/DeactivateUserCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private function createCommandTester(UserManipulator $manipulator, ?Application
6767

6868
$command = new DeactivateUserCommand($manipulator);
6969

70-
$application->add($command);
70+
$application->addCommands([$command]);
7171

7272
return new CommandTester($application->find('fos:user:deactivate'));
7373
}

tests/Command/DemoteUserCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function createCommandTester(UserManipulator $manipulator, ?Application
6868

6969
$command = new DemoteUserCommand($manipulator);
7070

71-
$application->add($command);
71+
$application->addCommands([$command]);
7272

7373
return new CommandTester($application->find('fos:user:demote'));
7474
}

tests/Command/PromoteUserCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function createCommandTester(UserManipulator $manipulator, ?Application
6868

6969
$command = new PromoteUserCommand($manipulator);
7070

71-
$application->add($command);
71+
$application->addCommands([$command]);
7272

7373
return new CommandTester($application->find('fos:user:promote'));
7474
}

0 commit comments

Comments
 (0)