19 declare(strict_types=1);
37 $this->reader =
new Reader();
42 #[\PHPUnit\Framework\Attributes\DataProvider('scenarios')] 45 require_once(__DIR__ .
"/scenarios/$scenario_file");
48 $resolved = $this->resolver->resolveDependencies([], ...
$components);
50 $result = $this->
renderer->render(...$resolved);
52 $expected = file_get_contents(__DIR__ .
"/scenarios/$result_file");
53 $this->assertEquals($expected, $result);
59 "no dependencies" => [
"scenario1.php",
"result1.php",
61 \ILIAS\Component\Tests\Dependencies\Scenario1\ComponentA::class
64 "pull dependency" => [
"scenario2.php",
"result2.php",
66 \ILIAS\Component\Tests\Dependencies\Scenario2\ComponentA::class,
67 \ILIAS\Component\Tests\Dependencies\Scenario2\ComponentB::class
70 "use dependency" => [
"scenario3.php",
"result3.php",
72 \ILIAS\Component\Tests\Dependencies\Scenario3\ComponentA::class,
73 \ILIAS\Component\Tests\Dependencies\Scenario3\ComponentB::class
76 "seek dependency" => [
"scenario4.php",
"result4.php",
78 \ILIAS\Component\Tests\Dependencies\Scenario4\ComponentA::class,
79 \ILIAS\Component\Tests\Dependencies\Scenario4\ComponentB::class,
80 \ILIAS\Component\Tests\Dependencies\Scenario4\ComponentC::class
83 "render entry points" => [
"scenario5.php",
"result5.php",
85 \ILIAS\Component\Tests\Dependencies\Scenario5\ComponentA::class
testScenario($scenario_file, $result_file, $components)