38 : void
39 {
40 $dic =
new Container();
41 $injector =
new Injector(
$dic,
new BaseDependencyMap());
42 $taskFactory = new BasicTaskFactory($injector);
43 $plusJob = $taskFactory->createTask(PlusJob::class, [1, 2]);
44 $this->assertInstanceOf(\
ILIAS\BackgroundTasks\
Implementation\Tasks\PlusJob::class, $plusJob);
45 $plusJobInput = $plusJob->getInput();
46 $one = new IntegerValue();
47 $one->setValue(1);
48 $this->assertTrue($plusJobInput[0]->equals($one));
49
50 $a =
new IntegerValue();
52 $b =
new IntegerValue();
54 $plusJob = $taskFactory->createTask(PlusJob::class, [
$a,
$b]);
55 $this->assertInstanceOf(\
ILIAS\BackgroundTasks\
Implementation\Tasks\PlusJob::class, $plusJob);
56 $plusJobInput = $plusJob->getInput();
57 $this->assertTrue($plusJobInput[0]->equals($one));
58 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples