ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLanguageSetupAgentTest Class Reference

Class ilLanguageSetupAgentTest. More...

+ Inheritance diagram for ilLanguageSetupAgentTest:
+ Collaboration diagram for ilLanguageSetupAgentTest:

Public Member Functions

 testCreate ()
 
 testHasConfig ()
 
 testGetArrayToConfigTransformation ()
 
 testGetInstallObjectives ()
 
 testGetUpdateObjective ()
 
 testGetBuildArtifactObjective ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilLanguageBaseTest
 setUp ()
 
 setGlobalVariable (string $name, $value)
 

Protected Attributes

 $obj
 

Detailed Description

Member Function Documentation

◆ setUp()

ilLanguageSetupAgentTest::setUp ( )
protected

Definition at line 37 of file ilLanguageSetupAgentTest.php.

References ILIAS\Repository\refinery().

37  : 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  }
+ Here is the call graph for this function:

◆ testCreate()

ilLanguageSetupAgentTest::testCreate ( )

Definition at line 45 of file ilLanguageSetupAgentTest.php.

45  : void
46  {
47  $this->assertInstanceOf(\ilLanguageSetupAgent::class, $this->obj);
48  }

◆ testGetArrayToConfigTransformation()

ilLanguageSetupAgentTest::testGetArrayToConfigTransformation ( )

Definition at line 55 of file ilLanguageSetupAgentTest.php.

55  : void
56  {
57  $this->expectException(LogicException::class);
58 
59  $this->obj->getArrayToConfigTransformation();
60  }

◆ testGetBuildArtifactObjective()

ilLanguageSetupAgentTest::testGetBuildArtifactObjective ( )

Definition at line 80 of file ilLanguageSetupAgentTest.php.

80  : void
81  {
82  $result = $this->obj->getBuildArtifactObjective();
83 
84  $this->assertInstanceOf(NullObjective::class, $result);
85  }

◆ testGetInstallObjectives()

ilLanguageSetupAgentTest::testGetInstallObjectives ( )

Definition at line 62 of file ilLanguageSetupAgentTest.php.

62  : 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  }

◆ testGetUpdateObjective()

ilLanguageSetupAgentTest::testGetUpdateObjective ( )

Definition at line 71 of file ilLanguageSetupAgentTest.php.

71  : 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  }

◆ testHasConfig()

ilLanguageSetupAgentTest::testHasConfig ( )

Definition at line 50 of file ilLanguageSetupAgentTest.php.

50  : void
51  {
52  $this->assertFalse($this->obj->hasConfig());
53  }

Field Documentation

◆ $obj

ilLanguageSetupAgentTest::$obj
protected

Definition at line 35 of file ilLanguageSetupAgentTest.php.


The documentation for this class was generated from the following file: