mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
34 lines
962 B
PHP
34 lines
962 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\TaskManager;
|
|
|
|
use Alchemy\TaskManager\Test\TaskTestCase;
|
|
use Alchemy\Phrasea\TaskManager\Task;
|
|
|
|
class TaskTest extends TaskTestCase
|
|
{
|
|
public function testThatCreatedProcessAreDifferents()
|
|
{
|
|
$process = $this->getMock('Symfony\Component\Process\ProcessableInterface');
|
|
$task = new Task('task number', 42, $process);
|
|
|
|
$created1 = $task->createProcess();
|
|
|
|
$this->assertEquals($process, $created1);
|
|
$this->assertNotSame($process, $created1);
|
|
|
|
$created2 = $task->createProcess();
|
|
|
|
$this->assertEquals($created1, $created2);
|
|
$this->assertNotSame($process, $created2);
|
|
$this->assertNotSame($created1, $created2);
|
|
}
|
|
|
|
protected function getTask()
|
|
{
|
|
$process = $this->getMock('Symfony\Component\Process\ProcessableInterface');
|
|
|
|
return new Task('task number', 42, $process);
|
|
}
|
|
}
|