ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
NullAgentTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
28 class NullAgentTest extends TestCase
29 {
30  protected \ILIAS\Refinery\Factory $refinery;
32  protected NullAgent $agent;
33 
34  public function setUp(): void
35  {
36  $this->refinery = $this->createMock(\ILIAS\Refinery\Factory::class);
37  $this->storage = $this->createMock(Metrics\Storage::class);
38  $this->agent = new NullAgent($this->refinery);
39  }
40 
41  public function testIsNull(): void
42  {
43  $null = new NullObjective();
44  $this->assertFalse($this->agent->hasConfig());
45  $this->assertEquals($null, $this->agent->getInstallObjective());
46  $this->assertEquals($null, $this->agent->getUpdateObjective());
47  $this->assertEquals($null, $this->agent->getBuildObjective());
48  $this->assertEquals($null, $this->agent->getStatusObjective($this->storage));
49  $this->assertEquals([], $this->agent->getMigrations());
50  }
51 
53  {
54  $this->expectException(\LogicException::class);
55  $this->agent->getArrayToConfigTransformation();
56  }
57 }
An agent that just doesn&#39;t do a thing.
Definition: NullAgent.php:34
Interface Observer Contains several chained tasks and infos about them.
A non-objective, nothing to do to achieve it...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...