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