ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ObjectiveConstructorTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
20 namespace ILIAS\Tests\Setup;
21 
26 
32 class ObjectiveConstructorTest extends TestCase
33 {
36  private \Closure $closure;
37 
38  protected function setUp(): void
39  {
40  parent::setUp();
41  $this->objectiveCollection = new ObjectiveCollection(
42  "",
43  false,
44  new NullObjective()
45  );
46 
47  $this->closure = function (): ObjectiveCollection {
49  };
50 
51  $this->testObj = new ObjectiveConstructor(
52  "My description",
53  $this->closure
54  );
55  }
56 
57  public function testGetDescription(): void
58  {
59  $this->assertEquals(
60  "My description",
61  $this->testObj->getDescription()
62  );
63  }
64 
65  public function testCreate(): void
66  {
67  $this->assertEquals($this->objectiveCollection, $this->testObj->create());
68  }
69 }
A objective collection is a objective that is achieved once all subobjectives are achieved...
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...