mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
33 lines
796 B
PHP
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);
|
|
}
|
|
}
|