ILIAS  release_7 Revision v7.30-3-g800a261c036
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 19 of file BasicTaskFactoryTest.php.

Member Function Documentation

◆ testBasicFactory()

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

Definition at line 21 of file BasicTaskFactoryTest.php.

22 {
23 $dic = new Container();
24 $injector = new Injector($dic, new BaseDependencyMap());
25 $taskFactory = new BasicTaskFactory($injector);
26 $plusJob = $taskFactory->createTask(PlusJob::class, [1, 2]);
27 $this->assertTrue($plusJob instanceof PlusJob);
28 $plusJobInput = $plusJob->getInput();
29 $one = new IntegerValue();
30 $one->setValue(1);
31 $this->assertTrue($plusJobInput[0]->equals($one));
32
33 $a = new IntegerValue();
34 $a->setValue(1);
35 $b = new IntegerValue();
36 $b->setValue(2);
37 $plusJob = $taskFactory->createTask(PlusJob::class, [$a, $b]);
38 $this->assertTrue($plusJob instanceof PlusJob);
39 $plusJobInput = $plusJob->getInput();
40 $this->assertTrue($plusJobInput[0]->equals($one));
41 }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
$dic
Definition: result.php:13

References Vendor\Package\$a, Vendor\Package\$b, and $dic.


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