ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCommonSetupAgentTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20namespace ILIAS\Tests\Setup;
21
22use PHPUnit\Framework\TestCase;
27use ILIAS\Refinery\Factory as Refinery;
28use ILIAS\Data\Factory as DataFactory;
29use ilLanguage;
30
36class 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}
Builds data types.
Definition: Factory.php:36
A configuration with no content.
Definition: NullConfig.php:27
A objective collection is a objective that is achieved once all subobjectives are achieved.
Contains common objectives for the setup.
language handling