ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCtrlAbstractPathTest Class Reference

Class ilCtrlAbstractPathTest. More...

+ Inheritance diagram for ilCtrlAbstractPathTest:
+ Collaboration diagram for ilCtrlAbstractPathTest:

Public Member Functions

 testAbstractPathGetCidPath ()
 
 testAbstractPathGetCurrentCid ()
 
 testAbstractPathGetNextCid ()
 
 testAbstractPathGetCidPaths ()
 
 testAbstractPathGetCidArray ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilCtrlPathTestBase
 setUp ()
 
 getPath (?string $cid_path=null)
 
- Protected Attributes inherited from ilCtrlPathTestBase
ilCtrlStructureInterface $structure
 

Detailed Description

Member Function Documentation

◆ testAbstractPathGetCidArray()

ilCtrlAbstractPathTest::testAbstractPathGetCidArray ( )

Definition at line 96 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

96  : void
97  {
98  $path = $this->getPath('a:b:c');
99  $this->assertEquals(['c', 'b', 'a'], $path->getCidArray());
100  $this->assertEquals(['a', 'b', 'c'], $path->getCidArray(SORT_ASC));
101 
102  $path = $this->getPath('');
103  $this->assertEmpty($path->getCidArray());
104 
105  $path = $this->getPath();
106  $this->assertEmpty($path->getCidArray());
107  }
$path
Definition: ltiservices.php:29
getPath(?string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCidPath()

ilCtrlAbstractPathTest::testAbstractPathGetCidPath ( )

Definition at line 30 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

30  : void
31  {
32  $path = $this->getPath('a:b:c');
33  $this->assertEquals('a:b:c', $path->getCidPath());
34 
35  $path = $this->getPath('0');
36  $this->assertEquals('0', $path->getCidPath());
37 
38  $path = $this->getPath('');
39  $this->assertNull($path->getCidPath());
40 
41  $path = $this->getPath();
42  $this->assertNull($path->getCidPath());
43  }
$path
Definition: ltiservices.php:29
getPath(?string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCidPaths()

ilCtrlAbstractPathTest::testAbstractPathGetCidPaths ( )

Definition at line 71 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

71  : void
72  {
73  $path = $this->getPath('0:1:2');
74  $this->assertEquals(
75  [
76  '0',
77  '0:1',
78  '0:1:2',
79  ],
80  $path->getCidPaths(SORT_ASC)
81  );
82 
83  $this->assertEquals(
84  [
85  '0:1:2',
86  '0:1',
87  '0',
88  ],
89  $path->getCidPaths()
90  );
91 
92  $path = $this->getPath('');
93  $this->assertEmpty($path->getCidPaths());
94  }
$path
Definition: ltiservices.php:29
getPath(?string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCurrentCid()

ilCtrlAbstractPathTest::testAbstractPathGetCurrentCid ( )

Definition at line 45 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

45  : void
46  {
47  $path = $this->getPath('a:b:c');
48  $this->assertEquals('c', $path->getCurrentCid());
49 
50  $path = $this->getPath('');
51  $this->assertNull($path->getCurrentCid());
52 
53  $path = $this->getPath();
54  $this->assertNull($path->getCurrentCid());
55  }
$path
Definition: ltiservices.php:29
getPath(?string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetNextCid()

ilCtrlAbstractPathTest::testAbstractPathGetNextCid ( )

Definition at line 57 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

57  : void
58  {
59  $path = $this->getPath('1:2:3');
60  $this->assertEquals('2', $path->getNextCid(ilCtrlBaseClass2TestGUI::class));
61  $this->assertEquals('3', $path->getNextCid(ilCtrlCommandClass1TestGUI::class));
62  $this->assertNull($path->getNextCid(ilCtrlCommandClass2TestGUI::class));
63 
64  $path = $this->getPath('');
65  $this->assertNull($path->getNextCid(ilCtrlBaseClass1TestGUI::class));
66 
67  $path = $this->getPath();
68  $this->assertNull($path->getNextCid(ilCtrlBaseClass1TestGUI::class));
69  }
$path
Definition: ltiservices.php:29
getPath(?string $cid_path=null)
+ Here is the call graph for this function:

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