3 declare(strict_types=1);
42 $refinery =
new Refinery($this->createMock(DataFactory::class), $this->createMock(\ilLanguage::class));
44 $agent = $this->createMock(Setup\AgentCollection::class);
45 $config_reader = $this->createMock(Setup\CLI\ConfigReader::class);
46 $agent_finder = $this->createMock(Setup\AgentFinder::class);
49 $tester =
new CommandTester($command);
51 $config = $this->createMock(Setup\ConfigCollection::class);
52 $config_file =
"config_file";
53 $config_file_content = [
"config_file"];
55 $objective = $this->createMock(Setup\Objective::class);
56 $env = $this->createMock(Setup\Environment::class);
59 ->expects($this->once())
60 ->method(
"readConfigFile")
62 ->willReturn($config_file_content);
65 ->expects($this->once())
71 ->expects($this->once())
76 ->expects($this->once())
77 ->method(
"getArrayToConfigTransformation")
79 ->willReturn(
$refinery->custom()->transformation(
function ($v) use ($config_file_content,
$config) {
80 $this->assertEquals($v, $config_file_content);
85 ->expects($this->never())
86 ->method(
"getInstallObjective")
91 ->expects($this->never())
92 ->method(
"getBuildArtifactObjective")
97 ->expects($this->once())
98 ->method(
"getUpdateObjective")
100 ->willReturn($objective);
103 ->expects($this->once())
104 ->method(
"getPreconditions")
107 $expects = $this->never();
110 if ($is_applicable) {
111 $expects = $this->once();
121 ->expects($this->once())
122 ->method(
"isApplicable")
123 ->willReturn($return);
126 "config" => $config_file
An objective is a desired state of the system that is supposed to be created by the setup...
testBasicFunctionalityAlreadyAchieved()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A non-objective, nothing to do to achieve it...
basicFunctionality(bool $is_applicable)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Refinery Factory $refinery