Definition at line 18 of file BasicTaskFactoryTest.php.
◆ testBasicFactory()
BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest::testBasicFactory |
( |
| ) |
|
Definition at line 20 of file BasicTaskFactoryTest.php.
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();
30 $this->assertTrue($plusJobInput[0]->equals($one));
32 $a =
new IntegerValue();
34 $b =
new IntegerValue();
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));
The documentation for this class was generated from the following file: