Revert modules tests

This commit is contained in:
Romain Neutron
2012-09-24 09:39:44 +02:00
parent 0977b4bc37
commit fb820c8582
3 changed files with 4 additions and 4 deletions

View File

@@ -22,14 +22,14 @@ class module_console_schedulerStateTest extends PHPUnit_Framework_TestCase
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName()));
$task_manager = new task_manager(self::$application);
$task_manager = new task_manager($application);
$state = $task_manager->getSchedulerState();
$sentence = sprintf('Scheduler is %s', $state['status']);
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
$commandTester->execute(array('command' => $command->getName(), '--short'=>true));
$task_manager = new task_manager(self::$application);
$task_manager = new task_manager($application);
$state = $task_manager->getSchedulerState();
$sentence = sprintf('%s(%s)', $state['status'], $state['pid']);

View File

@@ -31,7 +31,7 @@ class module_console_taskStateTest extends PhraseanetPHPUnitAbstract
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
// test good tasks ids
$task_manager = new task_manager(self::$application);
$task_manager = new task_manager($application);
$tasks = $task_manager->getTasks();
$tids = array(); // list known ids of tasks so we can generate a 'unknown id' later
foreach ($tasks as $task) {

View File

@@ -22,7 +22,7 @@ class module_console_tasklistTest extends PHPUnit_Framework_TestCase
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName()));
$task_manager = new task_manager(self::$application);
$task_manager = new task_manager($application);
$lines = explode("\n", trim($commandTester->getDisplay()));
if (count($task_manager->getTasks()) > 0) {