mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
Revert modules tests
This commit is contained in:
@@ -22,14 +22,14 @@ class module_console_schedulerStateTest extends PHPUnit_Framework_TestCase
|
|||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$commandTester->execute(array('command' => $command->getName()));
|
$commandTester->execute(array('command' => $command->getName()));
|
||||||
|
|
||||||
$task_manager = new task_manager(self::$application);
|
$task_manager = new task_manager($application);
|
||||||
$state = $task_manager->getSchedulerState();
|
$state = $task_manager->getSchedulerState();
|
||||||
|
|
||||||
$sentence = sprintf('Scheduler is %s', $state['status']);
|
$sentence = sprintf('Scheduler is %s', $state['status']);
|
||||||
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
||||||
|
|
||||||
$commandTester->execute(array('command' => $command->getName(), '--short'=>true));
|
$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();
|
$state = $task_manager->getSchedulerState();
|
||||||
|
|
||||||
$sentence = sprintf('%s(%s)', $state['status'], $state['pid']);
|
$sentence = sprintf('%s(%s)', $state['status'], $state['pid']);
|
||||||
|
@@ -31,7 +31,7 @@ class module_console_taskStateTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
||||||
|
|
||||||
// test good tasks ids
|
// test good tasks ids
|
||||||
$task_manager = new task_manager(self::$application);
|
$task_manager = new task_manager($application);
|
||||||
$tasks = $task_manager->getTasks();
|
$tasks = $task_manager->getTasks();
|
||||||
$tids = array(); // list known ids of tasks so we can generate a 'unknown id' later
|
$tids = array(); // list known ids of tasks so we can generate a 'unknown id' later
|
||||||
foreach ($tasks as $task) {
|
foreach ($tasks as $task) {
|
||||||
|
@@ -22,7 +22,7 @@ class module_console_tasklistTest extends PHPUnit_Framework_TestCase
|
|||||||
$commandTester = new CommandTester($command);
|
$commandTester = new CommandTester($command);
|
||||||
$commandTester->execute(array('command' => $command->getName()));
|
$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()));
|
$lines = explode("\n", trim($commandTester->getDisplay()));
|
||||||
|
|
||||||
if (count($task_manager->getTasks()) > 0) {
|
if (count($task_manager->getTasks()) > 0) {
|
||||||
|
Reference in New Issue
Block a user