Definition at line 19 of file BasicTaskFactoryTest.php.
◆ testBasicFactory()
BackgroundTasks\Implementation\Tasks\BasicTaskFactoryTest::testBasicFactory |
( |
| ) |
|
Definition at line 21 of file BasicTaskFactoryTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and $dic.
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();
31 $this->assertTrue($plusJobInput[0]->equals($one));
33 $a =
new IntegerValue();
35 $b =
new IntegerValue();
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));
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
The documentation for this class was generated from the following file: