ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest Class Reference
+ Inheritance diagram for BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest:
+ Collaboration diagram for BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest:

Public Member Functions

 testBasicFactory ()
 

Detailed Description

Definition at line 18 of file BasicTaskFactoryTest.php.

Member Function Documentation

◆ testBasicFactory()

BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest::testBasicFactory ( )

Definition at line 20 of file BasicTaskFactoryTest.php.

21 {
22 $dic = new Container();
23 $injector = new Injector($dic, new BaseDependencyMap());
24 $taskFactory = new BasicTaskFactory($injector);
25 $plusJob = $taskFactory->createTask(PlusJob::class, [1, 2]);
26 $this->assertTrue($plusJob instanceof PlusJob);
27 $plusJobInput = $plusJob->getInput();
28 $one = new IntegerValue();
29 $one->setValue(1);
30 $this->assertTrue($plusJobInput[0]->equals($one));
31
32 $a = new IntegerValue();
33 $a->setValue(1);
34 $b = new IntegerValue();
35 $b->setValue(2);
36 $plusJob = $taskFactory->createTask(PlusJob::class, [$a, $b]);
37 $this->assertTrue($plusJob instanceof PlusJob);
38 $plusJobInput = $plusJob->getInput();
39 $this->assertTrue($plusJobInput[0]->equals($one));
40 }

The documentation for this class was generated from the following file: