ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 ilLanguageBaseTestCase
 setUp ()
 
 setGlobalVariable (string $name, $value)
 

Protected Attributes

 $obj
 

Detailed Description

Class ilLanguageSetupAgentTest.

Definition at line 28 of file ilLanguageSetupAgentTest.php.

Member Function Documentation

◆ setUp()

ilLanguageSetupAgentTest::setUp ( )
protected

Definition at line 35 of file ilLanguageSetupAgentTest.php.

References ILIAS\UI\examples\Layout\Page\Standard\$refinery.

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

◆ testCreate()

ilLanguageSetupAgentTest::testCreate ( )

Definition at line 43 of file ilLanguageSetupAgentTest.php.

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

◆ testGetArrayToConfigTransformation()

ilLanguageSetupAgentTest::testGetArrayToConfigTransformation ( )

Definition at line 53 of file ilLanguageSetupAgentTest.php.

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

◆ testGetBuildArtifactObjective()

ilLanguageSetupAgentTest::testGetBuildArtifactObjective ( )

Definition at line 78 of file ilLanguageSetupAgentTest.php.

78  : void
79  {
80  $result = $this->obj->getBuildObjective();
81 
82  $this->assertInstanceOf(NullObjective::class, $result);
83  }

◆ testGetInstallObjectives()

ilLanguageSetupAgentTest::testGetInstallObjectives ( )

Definition at line 60 of file ilLanguageSetupAgentTest.php.

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

◆ testGetUpdateObjective()

ilLanguageSetupAgentTest::testGetUpdateObjective ( )

Definition at line 69 of file ilLanguageSetupAgentTest.php.

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

◆ testHasConfig()

ilLanguageSetupAgentTest::testHasConfig ( )

Definition at line 48 of file ilLanguageSetupAgentTest.php.

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

Field Documentation

◆ $obj

ilLanguageSetupAgentTest::$obj
protected

Definition at line 33 of file ilLanguageSetupAgentTest.php.


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