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

33 lines
796 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\TaskManager\Log;
use Alchemy\Phrasea\TaskManager\Log\TaskLogFile;
use Alchemy\Phrasea\Model\Entities\Task;
class TaskLogFileTest extends LogFileTestCase
{
public function testGetters()
{
$task = new Task();
$root = '/path/to/root';
$logfile = new TaskLogFile($root, $task);
$this->assertSame($task, $logfile->getTask());
$this->assertSame($root, $logfile->getRoot());
}
protected function getLogFile($root)
{
$task = new Task();
$task
->setName('task')
->setJobId('Alchemy\Phrasea\TaskManager\Job\NullJob');
self::$DI['app']['EM']->persist($task);
self::$DI['app']['EM']->flush();
return new TaskLogFile($root, $task);
}
}