mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
28 lines
996 B
PHP
28 lines
996 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Command\Task;
|
|
|
|
use Alchemy\Phrasea\Command\Task\SchedulerRun;
|
|
|
|
class SchedulerRunTest extends \PhraseanetTestCase
|
|
{
|
|
public function testRunWithoutProblems()
|
|
{
|
|
self::$DI['cli']['task-manager'] = $this->getMockBuilder('Alchemy\TaskManager\TaskManager')
|
|
->disableOriginalConstructor()
|
|
->getMock();
|
|
self::$DI['cli']['task-manager']->expects($this->once())
|
|
->method('addSubscriber')
|
|
->with($this->isInstanceOf('Alchemy\TaskManager\Event\TaskManagerSubscriber\LockFileSubscriber'));
|
|
self::$DI['cli']['task-manager']->expects($this->once())
|
|
->method('start');
|
|
|
|
$input = $this->getMock('Symfony\Component\Console\Input\InputInterface');
|
|
$output = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
|
|
|
|
$command = new SchedulerRun();
|
|
$command->setContainer(self::$DI['cli']);
|
|
$command->execute($input, $output);
|
|
}
|
|
}
|