ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLanguageSetupAgentTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Refinery\Factory as Refinery;
22use ILIAS\Data\Factory as DataFactory;
24
29{
33 protected $obj;
34
35 protected function setUp(): void
36 {
37 $refinery = new Refinery($this->createMock(DataFactory::class), $this->createMock(\ilLanguage::class));
38 $setup_language = $this->createMock(ilSetupLanguage::class);
39
40 $this->obj = new \ilLanguageSetupAgent($refinery, $setup_language);
41 }
42
43 public function testCreate(): void
44 {
45 $this->assertInstanceOf(\ilLanguageSetupAgent::class, $this->obj);
46 }
47
48 public function testHasConfig(): void
49 {
50 $this->assertFalse($this->obj->hasConfig());
51 }
52
53 public function testGetArrayToConfigTransformation(): void
54 {
55 $this->expectException(LogicException::class);
56
57 $this->obj->getArrayToConfigTransformation();
58 }
59
60 public function testGetInstallObjectives(): void
61 {
62 $objective_collection = $this->obj->getInstallObjective();
63
64 $this->assertEquals('Complete objectives from components/ILIAS/Language', $objective_collection->getLabel());
65 $this->assertFalse($objective_collection->isNotable());
66 $this->assertCount(2, $objective_collection->getObjectives());
67 }
68
69 public function testGetUpdateObjective(): void
70 {
71 $objective_collection = $this->obj->getUpdateObjective();
72
73 $this->assertEquals('Complete objectives from components/ILIAS/Language', $objective_collection->getLabel());
74 $this->assertFalse($objective_collection->isNotable());
75 $this->assertCount(1, $objective_collection->getObjectives());
76 }
77
78 public function testGetBuildArtifactObjective(): void
79 {
80 $result = $this->obj->getBuildObjective();
81
82 $this->assertInstanceOf(NullObjective::class, $result);
83 }
84}
Builds data types.
Definition: Factory.php:36
A non-objective, nothing to do to achieve it...
Class ilLanguageBaseTest.
Class ilLanguageSetupAgentTest.