ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
6 
7 use ILIAS\Setup;
10 
12 {
16  protected $o;
17 
18  public function setUp() : void
19  {
20  $this->o = new Objective\NullObjective();
21  }
22 
23  public function testGetHash() : void
24  {
25  $this->assertIsString($this->o->getHash());
26  }
27 
28  public function testGetLabel() : void
29  {
30  $this->assertEquals("Nothing to do.", $this->o->getLabel());
31  }
32 
33  public function testIsNotable() : void
34  {
35  $this->assertFalse($this->o->isNotable());
36  }
37 
38  public function testGetPreconditions() : void
39  {
40  $env = $this->createMock(Setup\Environment::class);
41 
42  $pre = $this->o->getPreconditions($env);
43  $this->assertEquals([], $pre);
44  }
45 
46  public function testAchieve() : void
47  {
48  $env = $this->createMock(Setup\Environment::class);
49 
50  $res = $this->o->achieve($env);
51  $this->assertSame($env, $res);
52  }
53 }
foreach($_POST as $key=> $value) $res
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...