ILIAS  release_8 Revision v8.24
NullAgentTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
26use PHPUnit\Framework\TestCase;
27
28class NullAgentTest extends TestCase
29{
30 public function setUp(): void
31 {
32 $this->refinery = $this->createMock(\ILIAS\Refinery\Factory::class);
33 $this->storage = $this->createMock(Metrics\Storage::class);
34 $this->refinery = $this->createMock(\ILIAS\Refinery\Factory::class);
35 $this->agent = new NullAgent($this->refinery);
36 }
37
38 public function testIsNull(): void
39 {
40 $null = new NullObjective();
41 $this->assertFalse($this->agent->hasConfig());
42 $this->assertEquals($null, $this->agent->getInstallObjective());
43 $this->assertEquals($null, $this->agent->getUpdateObjective());
44 $this->assertEquals($null, $this->agent->getBuildArtifactObjective());
45 $this->assertEquals($null, $this->agent->getStatusObjective($this->storage));
46 $this->assertEquals([], $this->agent->getMigrations());
47 }
48
50 {
51 $this->expectException(\LogicException::class);
52 $this->agent->getArrayToConfigTransformation();
53 }
54}
An agent that just doesn't do a thing.
Definition: NullAgent.php:35
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.