ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
BasicTaskManagerTest.php
Go to the documentation of this file.
1<?php
10
20use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
21
23{
24 use MockeryPHPUnitIntegration;
25
26 protected $taskManager;
27 protected $bucket;
28
29 public function setUp()
30 {
31 $persistence = \Mockery::mock(BasicPersistence::class);
32 $this->taskManager = new BasicTaskManager($persistence);
33 }
34
35 public function testBasicTaskManager()
36 {
37 $dic = new Container();
38
39 $factory = new Injector($dic, new EmptyDependencyMap());
40
41 $bucket = new BasicBucket();
42 $bucket->setUserId(3);
43 $bucket->setState(State::SCHEDULED);
44
46 $a = $factory->createInstance(PlusJob::class);
48 $b = $factory->createInstance(PlusJob::class);
50 $c = $factory->createInstance(PlusJob::class);
51
52 $a->setInput([1, 1]);
53 $b->setInput([1, 1]);
54 $c->setInput([$a, $b]);
55
57 $userInteraction = $factory->createInstance(DownloadInteger::class);
58 $userInteraction->setInput([$c]);
59
60 $bucket->setTask($userInteraction);
61
62 $this->bucket = $bucket;
63 }
64}
$factory
Definition: metadata.php:47
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:16