Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Command/Task/TaskStartTest.php
Romain Neutron 5d2dd07caa Fix latest rebase
2013-10-29 18:56:01 +01:00

33 lines
924 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\Command\Task;
use Alchemy\Phrasea\Command\Task\TaskStart;
use Alchemy\Phrasea\Model\Entities\Task;
class TaskStartTest extends \PhraseanetPHPUnitAbstract
{
public function testRunWithoutProblems()
{
$task = new Task();
$task
->setName('Task')
->setJobId('Null');
self::$DI['cli']['EM']->persist($task);
self::$DI['cli']['EM']->flush();
$input = $this->getMock('Symfony\Component\Console\Input\InputInterface');
$output = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
$input->expects($this->any())
->method('getArgument')
->with('task_id')
->will($this->returnValue($task->getId()));
$command = new TaskStart();
$command->setContainer(self::$DI['cli']);
$command->execute($input, $output);
}
}