mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Fix CS in unit tests + remove unused unit tests
This commit is contained in:
@@ -4,26 +4,24 @@ require_once __DIR__ . '/../../PhraseanetWebTestCaseAuthenticatedAbstract.class.
|
||||
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use \Symfony\Component\Console\Application;
|
||||
|
||||
class module_console_schedulerStateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testExecute()
|
||||
{
|
||||
// mock the Kernel or create one depending on your needs
|
||||
$application = new Application();
|
||||
$application->add(new module_console_schedulerState('system:schedulerState'));
|
||||
public function testExecute()
|
||||
{
|
||||
// mock the Kernel or create one depending on your needs
|
||||
$application = new Application();
|
||||
$application->add(new module_console_schedulerState('system:schedulerState'));
|
||||
|
||||
$command = $application->find('system:schedulerState');
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array('command' => $command->getName()));
|
||||
|
||||
$task_manager = new task_manager(appbox::get_instance(\bootstrap::getCore()));
|
||||
$state = $task_manager->get_scheduler_state();
|
||||
|
||||
$sentence = sprintf('Scheduler is %s', $state['status']);
|
||||
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
||||
|
||||
}
|
||||
$command = $application->find('system:schedulerState');
|
||||
$commandTester = new CommandTester($command);
|
||||
$commandTester->execute(array('command' => $command->getName()));
|
||||
|
||||
$task_manager = new task_manager(appbox::get_instance(\bootstrap::getCore()));
|
||||
$state = $task_manager->get_scheduler_state();
|
||||
|
||||
$sentence = sprintf('Scheduler is %s', $state['status']);
|
||||
$this->assertTrue(strpos($commandTester->getDisplay(), $sentence) !== false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user