ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCommonSetupAgentTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 namespace ILIAS\Tests\Setup;
21 
29 use ilLanguage;
30 
36 class ilCommonSetupAgentTest extends TestCase
37 {
39 
40  protected function setUp(): void
41  {
42  $refinery = new Refinery(
43  $this->createMock(DataFactory::class),
44  $this->createMock(ilLanguage::class)
45  );
46 
47  parent::setUp();
48  $this->testObj = new ilCommonSetupAgent($refinery, $this->createMock(DataFactory::class));
49  }
50 
51  public function testGetNamedObjectives(): void
52  {
53  $this->assertArrayHasKey(
54  "registerNICKey",
55  $this->testObj->getNamedObjectives(new NullConfig())
56  );
57  }
58 
59  public function testExecuteClosure(): void
60  {
61  $objectiveConstructor = $this->testObj->getNamedObjectives(new NullConfig())["registerNICKey"];
62  $closureResult = $objectiveConstructor->create();
63  $this->assertInstanceOf(Objective::class, $closureResult);
64  }
65 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A configuration with no content.
Definition: NullConfig.php:26