ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
NullObjectiveTest.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\Tests\Setup;
6
8
9class NullObjectiveTest extends \PHPUnit\Framework\TestCase
10{
11 public function setUp() : void
12 {
13 $this->o = new Setup\NullObjective();
14 }
15
16 public function testGetHash()
17 {
18 $this->assertIsString($this->o->getHash());
19 }
20
21 public function testGetLabel()
22 {
23 $this->assertEquals("Nothing to do.", $this->o->getLabel());
24 }
25
26 public function testIsNotable()
27 {
28 $this->assertFalse($this->o->isNotable());
29 }
30
31 public function testGetPreconditions()
32 {
33 $env = $this->createMock(Setup\Environment::class);
34
35 $pre = $this->o->getPreconditions($env);
36 $this->assertEquals([], $pre);
37 }
38
39
40 public function testAchieve()
41 {
42 $env = $this->createMock(Setup\Environment::class);
43
44 $res = $this->o->achieve($env);
45 $this->assertSame($env, $res);
46 }
47}
An exception for terminatinating execution or to throw for unit testing.
A non-objective, nothing to do to achieve it...
foreach($_POST as $key=> $value) $res