mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/16790] Remove useless command parameter
PHPBB3-16790
This commit is contained in:
@@ -45,7 +45,6 @@ class phpbb_console_user_activate_test extends phpbb_console_user_base
|
||||
));
|
||||
|
||||
$command = $application->find('user:activate');
|
||||
$this->command_name = $command->getName();
|
||||
|
||||
return new CommandTester($command);
|
||||
}
|
||||
@@ -75,7 +74,6 @@ class phpbb_console_user_activate_test extends phpbb_console_user_base
|
||||
$command_tester = $this->get_command_tester();
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'username' => $username,
|
||||
'--deactivate' => $deactivate,
|
||||
));
|
||||
|
@@ -36,7 +36,6 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
));
|
||||
|
||||
$command = $application->find('user:add');
|
||||
$this->command_name = $command->getName();
|
||||
|
||||
if (!empty($question_answers))
|
||||
{
|
||||
@@ -86,7 +85,6 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
$this->assertEquals(2, $this->get_user_id('Admin'));
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'--username' => 'foo',
|
||||
'--password' => 'bar',
|
||||
'--email' => 'foo@test.com'
|
||||
@@ -108,9 +106,7 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
|
||||
$command_tester->setInputs(['bar', 'password', 'password', 'bar@test.com']);
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
));
|
||||
$command_tester->execute([]);
|
||||
|
||||
$this->assertNotEquals(null, $this->get_user_id('bar'));
|
||||
$this->assertStringContainsString('CLI_USER_ADD_SUCCESS', $command_tester->getDisplay());
|
||||
@@ -124,7 +120,6 @@ class phpbb_console_user_add_test extends phpbb_console_user_base
|
||||
$this->assertEquals(3, $this->get_user_id('Test'));
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'--username' => 'Test',
|
||||
'--password' => '1',
|
||||
'--email' => 'foo'
|
||||
|
@@ -19,7 +19,6 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case
|
||||
protected $language;
|
||||
protected $log;
|
||||
protected $passwords_manager;
|
||||
protected $command_name;
|
||||
/** @var Symfony\Component\Console\Helper\QuestionHelper */
|
||||
protected $question;
|
||||
protected $user_loader;
|
||||
|
@@ -32,7 +32,6 @@ class phpbb_console_user_delete_test extends phpbb_console_user_base
|
||||
));
|
||||
|
||||
$command = $application->find('user:delete');
|
||||
$this->command_name = $command->getName();
|
||||
$this->question = $command->getHelper('question');
|
||||
|
||||
return new CommandTester($command);
|
||||
@@ -47,7 +46,6 @@ class phpbb_console_user_delete_test extends phpbb_console_user_base
|
||||
$command_tester->setInputs(['yes', '']);
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'username' => 'Test',
|
||||
'--delete-posts' => false,
|
||||
));
|
||||
@@ -65,7 +63,6 @@ class phpbb_console_user_delete_test extends phpbb_console_user_base
|
||||
$command_tester->setInputs(['yes', '']);
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'username' => 'Foo',
|
||||
'--delete-posts' => false,
|
||||
));
|
||||
@@ -82,7 +79,6 @@ class phpbb_console_user_delete_test extends phpbb_console_user_base
|
||||
$command_tester->setInputs(['no', '']);
|
||||
|
||||
$command_tester->execute(array(
|
||||
'command' => $this->command_name,
|
||||
'username' => 'Test',
|
||||
'--delete-posts' => false,
|
||||
));
|
||||
|
@@ -29,7 +29,6 @@ class phpbb_console_user_reclean_test extends phpbb_console_user_base
|
||||
));
|
||||
|
||||
$command = $application->find('user:reclean');
|
||||
$this->command_name = $command->getName();
|
||||
|
||||
return new CommandTester($command);
|
||||
}
|
||||
@@ -38,7 +37,7 @@ class phpbb_console_user_reclean_test extends phpbb_console_user_base
|
||||
{
|
||||
$command_tester = $this->get_command_tester();
|
||||
|
||||
$exit_status = $command_tester->execute(array('command' => $this->command_name));
|
||||
$exit_status = $command_tester->execute([]);
|
||||
$this->assertSame(0, $exit_status);
|
||||
|
||||
$result = $this->db->sql_query('SELECT user_id FROM ' . USERS_TABLE . " WHERE username_clean = 'test unclean'");
|
||||
|
Reference in New Issue
Block a user