ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Tests\Setup\CLI\BuildCommandTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Setup\CLI\BuildCommandTest:
+ Collaboration diagram for ILIAS\Tests\Setup\CLI\BuildCommandTest:

Public Member Functions

 testBasicFunctionality ()
 

Detailed Description

Definition at line 27 of file BuildCommandTest.php.

Member Function Documentation

◆ testBasicFunctionality()

ILIAS\Tests\Setup\CLI\BuildCommandTest::testBasicFunctionality ( )

Definition at line 29 of file BuildCommandTest.php.

References Vendor\Package\$e.

29  : void
30  {
31  $agent_finder = $this->createMock(Setup\AgentFinder::class);
32 
33  $agent = $this->createMock(Setup\AgentCollection::class);
34  $agent_finder
35  ->expects($this->once())
36  ->method("getAgents")
37  ->with()
38  ->willReturn($agent);
39 
40  $objective = $this->createMock(Setup\Objective::class);
41  $agent
42  ->expects($this->once())
43  ->method("getBuildObjective")
44  ->with()
45  ->willReturn($objective);
46 
47  $objective
48  ->expects($this->once())
49  ->method("getPreconditions")
50  ->willReturn([]);
51 
52  $objective
53  ->expects($this->once())
54  ->method("achieve")
55  ->will($this->returnCallback(function (Setup\Environment $e) {
56  return $e;
57  }));
58 
59  $objective
60  ->expects($this->once())
61  ->method("isApplicable")
62  ->willReturn(true);
63 
64  $command = new Setup\CLI\BuildCommand($agent_finder);
65  $tester = new CommandTester($command);
66  $tester->execute([]);
67  }

The documentation for this class was generated from the following file: