19 declare(strict_types=1);
32 protected bool $only_new_cases
38 return ($this->only_new_cases) ? self::FILENAME_NEW : self::FILENAME_UPDATE;
44 new \ilComponentFactoryExistsObjective()
50 return Setup\Artifact\BuildArtifactObjective::ARTIFACTS .
"/" . $this->
getArtifactName();
55 $component_factory = $environment->
getResource(
Setup\Environment::RESOURCE_COMPONENT_FACTORY);
56 $plugin_admin = $environment->getResource(
Setup\Environment::RESOURCE_PLUGIN_ADMIN);
59 $GLOBALS[
"DIC"] =
new DI\Container();
60 $GLOBALS[
"DIC"][
"component.factory"] = $component_factory;
61 $GLOBALS[
"DIC"][
"ilPluginAdmin"] = $plugin_admin;
63 $path =
'components/ILIAS/Style/classes/Setup/templates/testrail.case.xml';
65 $parser =
new Crawler\ExamplesYamlParser();
68 $environment = $environment->withResource(self::TESTCASEWRITER, $testcases);
70 parent::achieve($environment);
81 $crawler =
new Crawler\FactoriesCrawler();
85 foreach (
$data as $entry) {
86 $path = explode(
'/', $entry->getPath());
87 if (end(
$path) ===
'Factory') {
91 $section = array_shift(
$path);
92 $section = array_shift(
$path);
93 $section = array_shift(
$path);
94 if (! array_key_exists($section, $sorted)) {
95 $sorted[$section] = [];
98 $path[] = $entry->getTitle();
99 $sorted[$section][] = [implode(
'/',
$path), $entry];
103 $writer = $env->getResource(self::TESTCASEWRITER)
105 return new Setup\Artifact\XMLArtifact($writer->getXML());
achieve(Setup\Environment $environment)
__construct(protected bool $only_new_cases)
buildIn(Setup\Environment $env)
getPreconditions(Setup\Environment $environment)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
An artifact is some file that is build on demand per installation and is not shipped with the ILIAS s...