ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCtrlStructureReaderTest Class Reference

Class ilCtrlStructureReaderTest. More...

+ Inheritance diagram for ilCtrlStructureReaderTest:
+ Collaboration diagram for ilCtrlStructureReaderTest:

Public Member Functions

 testStructureReaderWithValidArrayIterator ()
 
 testStructureReaderWithInvalidArrayIterator ()
 
 testStructureReaderWithEmptyArrayIterator ()
 

Protected Member Functions

 setUp ()
 

Private Attributes

array $expected_test_gui_structure
 

Detailed Description

Member Function Documentation

◆ setUp()

ilCtrlStructureReaderTest::setUp ( )
protected

Definition at line 38 of file ilCtrlStructureReaderTest.php.

38  : void
39  {
40  $this->expected_test_gui_structure = require __DIR__ . '/../Data/Structure/test_ctrl_structure.php';
41  }

◆ testStructureReaderWithEmptyArrayIterator()

ilCtrlStructureReaderTest::testStructureReaderWithEmptyArrayIterator ( )

Definition at line 73 of file ilCtrlStructureReaderTest.php.

73  : void
74  {
75  $reader = new ilCtrlStructureReader(
76  new ilCtrlArrayIterator([]),
78  );
79 
80  $this->assertFalse($reader->isExecuted());
81  $this->assertEmpty($reader->readStructure());
82  $this->assertTrue($reader->isExecuted());
83  }
Class ilCtrlStructureCidGenerator.
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure.
Class ilCtrlArrayIterator.

◆ testStructureReaderWithInvalidArrayIterator()

ilCtrlStructureReaderTest::testStructureReaderWithInvalidArrayIterator ( )

Definition at line 60 of file ilCtrlStructureReaderTest.php.

60  : void
61  {
62  $class_map = require __DIR__ . '/../Data/ClassMaps/invalid_class_map.php';
63  $reader = new ilCtrlStructureReader(
64  new ilCtrlArrayIterator($class_map),
66  );
67 
68  $this->assertFalse($reader->isExecuted());
69  $this->assertEmpty($reader->readStructure());
70  $this->assertTrue($reader->isExecuted());
71  }
Class ilCtrlStructureCidGenerator.
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure.
Class ilCtrlArrayIterator.

◆ testStructureReaderWithValidArrayIterator()

ilCtrlStructureReaderTest::testStructureReaderWithValidArrayIterator ( )

Definition at line 43 of file ilCtrlStructureReaderTest.php.

43  : void
44  {
45  $class_map = require __DIR__ . '/../Data/ClassMaps/valid_class_map.php';
46  $reader = new ilCtrlStructureReader(
47  new ilCtrlArrayIterator($class_map),
49  );
50 
51  $this->assertFalse($reader->isExecuted());
52  $this->assertEquals(
53  $this->expected_test_gui_structure,
54  $reader->readStructure()
55  );
56 
57  $this->assertTrue($reader->isExecuted());
58  }
Class ilCtrlStructureCidGenerator.
Class ilCtrlStructureReader is responsible for reading ilCtrl's control structure.
Class ilCtrlArrayIterator.

Field Documentation

◆ $expected_test_gui_structure

array ilCtrlStructureReaderTest::$expected_test_gui_structure
private

Definition at line 33 of file ilCtrlStructureReaderTest.php.


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