ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NullObjectiveTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Setup;
25use PHPUnit\Framework\TestCase;
26
27class NullObjectiveTest extends TestCase
28{
30
31 public function setUp(): void
32 {
33 $this->o = new Objective\NullObjective();
34 }
35
36 public function testGetHash(): void
37 {
38 $this->assertIsString($this->o->getHash());
39 }
40
41 public function testGetLabel(): void
42 {
43 $this->assertEquals("Nothing to do.", $this->o->getLabel());
44 }
45
46 public function testIsNotable(): void
47 {
48 $this->assertFalse($this->o->isNotable());
49 }
50
51 public function testGetPreconditions(): void
52 {
53 $env = $this->createMock(Setup\Environment::class);
54
55 $pre = $this->o->getPreconditions($env);
56 $this->assertEquals([], $pre);
57 }
58
59 public function testAchieve(): void
60 {
61 $env = $this->createMock(Setup\Environment::class);
62
63 $res = $this->o->achieve($env);
64 $this->assertSame($env, $res);
65 }
66}
A non-objective, nothing to do to achieve it...
$res
Definition: ltiservices.php:69
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...