aboutsummaryrefslogtreecommitdiffstats
path: root/tests/console
diff options
context:
space:
mode:
authorLEZY Thomas <thomas.gif.91@gmail.com>2014-05-28 14:39:02 +0200
committerLEZY Thomas <thomas.gif.91@gmail.com>2014-05-28 14:49:55 +0200
commit6f279c1bf47c4c86a507acc9ea7d705dad6e9b97 (patch)
tree6d2b5be8bbc1fd3bb8b42b87018bbe40d76f1bea /tests/console
parent9761c1bf617763671308fabc569ec13d40cb6843 (diff)
downloadforums-6f279c1bf47c4c86a507acc9ea7d705dad6e9b97.tar
forums-6f279c1bf47c4c86a507acc9ea7d705dad6e9b97.tar.gz
forums-6f279c1bf47c4c86a507acc9ea7d705dad6e9b97.tar.bz2
forums-6f279c1bf47c4c86a507acc9ea7d705dad6e9b97.tar.xz
forums-6f279c1bf47c4c86a507acc9ea7d705dad6e9b97.zip
[ticket/12597] Update pull-request
Removes a useless comment. Switchs command name from cron:execute-all to cron:run-all. Replaces assertEquals by assertSame PHPBB3-12597
Diffstat (limited to 'tests/console')
-rw-r--r--tests/console/cron/run_all_test.php (renamed from tests/console/cron/execute_all_test.php)18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/console/cron/execute_all_test.php b/tests/console/cron/run_all_test.php
index 48ea79e29d..b718d1c117 100644
--- a/tests/console/cron/execute_all_test.php
+++ b/tests/console/cron/run_all_test.php
@@ -9,11 +9,11 @@
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
-use phpbb\console\command\cron\execute_all;
+use phpbb\console\command\cron\run_all;
require_once dirname(__FILE__) . '/tasks/simple.php';
-class phpbb_console_command_cron_execute_all_test extends phpbb_database_test_case
+class phpbb_console_command_cron_run_all_test extends phpbb_database_test_case
{
protected $db;
protected $config;
@@ -47,7 +47,7 @@ class phpbb_console_command_cron_execute_all_test extends phpbb_database_test_ca
$cron_num_exec = 0;
- $this->assertEquals('0', $config['cron_lock']);
+ $this->assertSame('0', $config['cron_lock']);
}
public function test_normal_use()
@@ -57,8 +57,8 @@ class phpbb_console_command_cron_execute_all_test extends phpbb_database_test_ca
$command_tester = $this->get_command_tester();
$command_tester->execute(array('command' => $this->command_name));
- $this->assertEquals('', $command_tester->getDisplay());
- $this->assertEquals(1, $cron_num_exec);
+ $this->assertSame('', $command_tester->getDisplay());
+ $this->assertSame(1, $cron_num_exec);
}
public function test_verbose_mode()
@@ -69,7 +69,7 @@ class phpbb_console_command_cron_execute_all_test extends phpbb_database_test_ca
$command_tester->execute(array('command' => $this->command_name, '--verbose' => true));
$this->assertContains('RUNNING_TASK', $command_tester->getDisplay());
- $this->assertEquals(1, $cron_num_exec);
+ $this->assertSame(1, $cron_num_exec);
}
public function test_error_lock()
@@ -81,15 +81,15 @@ class phpbb_console_command_cron_execute_all_test extends phpbb_database_test_ca
$command_tester->execute(array('command' => $this->command_name));
$this->assertContains('CRON_LOCK_ERROR', $command_tester->getDisplay());
- $this->assertEquals(0, $cron_num_exec);
+ $this->assertSame(0, $cron_num_exec);
}
public function get_command_tester()
{
$application = new Application();
- $application->add(new execute_all($this->cron_manager, $this->lock, $this->user));
+ $application->add(new run_all($this->cron_manager, $this->lock, $this->user));
- $command = $application->find('cron:execute-all');
+ $command = $application->find('cron:run-all');
$this->command_name = $command->getName();
return new CommandTester($command);
}