16 $refinery =
new Refinery($this->createMock(DataFactory::class), $this->createMock(\ilLanguage::class));
18 $agent = $this->createMock(Setup\Agent::class);
19 $config_reader = $this->createMock(Setup\CLI\ConfigReader::class);
22 }, $config_reader, []);
24 $tester =
new CommandTester($command);
26 $config = $this->createMock(Setup\Config::class);
27 $config_file =
"config_file";
28 $config_file_content = [
"config_file"];
30 $objective = $this->createMock(Setup\Objective::class);
31 $env = $this->createMock(Setup\Environment::class);
34 ->expects($this->once())
35 ->method(
"readConfigFile")
37 ->willReturn($config_file_content);
40 ->expects($this->once())
45 ->expects($this->once())
46 ->method(
"getArrayToConfigTransformation")
48 ->willReturn($refinery->custom()->transformation(
function ($v) use ($config_file_content,
$config) {
49 $this->assertEquals($v, $config_file_content);
54 ->expects($this->never())
55 ->method(
"getInstallObjective")
60 ->expects($this->never())
61 ->method(
"getBuildArtifactObjective")
66 ->expects($this->once())
67 ->method(
"getUpdateObjective")
69 ->willReturn($objective);
72 ->expects($this->once())
73 ->method(
"getPreconditions")
77 ->expects($this->once())
82 "config" => $config_file
A non-objective, nothing to do to achieve it...