ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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 82 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

82  : void
83  {
84  $path = $this->getPath('a:b:c');
85  $this->assertEquals(['c', 'b', 'a'], $path->getCidArray());
86  $this->assertEquals(['a', 'b', 'c'], $path->getCidArray(SORT_ASC));
87 
88  $path = $this->getPath('');
89  $this->assertEmpty($path->getCidArray());
90 
91  $path = $this->getPath();
92  $this->assertEmpty($path->getCidArray());
93  }
$path
Definition: ltiservices.php:32
getPath(string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCidPath()

ilCtrlAbstractPathTest::testAbstractPathGetCidPath ( )

Definition at line 16 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

16  : void
17  {
18  $path = $this->getPath('a:b:c');
19  $this->assertEquals('a:b:c', $path->getCidPath());
20 
21  $path = $this->getPath('0');
22  $this->assertEquals('0', $path->getCidPath());
23 
24  $path = $this->getPath('');
25  $this->assertNull($path->getCidPath());
26 
27  $path = $this->getPath();
28  $this->assertNull($path->getCidPath());
29  }
$path
Definition: ltiservices.php:32
getPath(string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCidPaths()

ilCtrlAbstractPathTest::testAbstractPathGetCidPaths ( )

Definition at line 57 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

57  : void
58  {
59  $path = $this->getPath('0:1:2');
60  $this->assertEquals(
61  [
62  '0',
63  '0:1',
64  '0:1:2',
65  ],
66  $path->getCidPaths(SORT_ASC)
67  );
68 
69  $this->assertEquals(
70  [
71  '0:1:2',
72  '0:1',
73  '0',
74  ],
75  $path->getCidPaths()
76  );
77 
78  $path = $this->getPath('');
79  $this->assertEmpty($path->getCidPaths());
80  }
$path
Definition: ltiservices.php:32
getPath(string $cid_path=null)
+ Here is the call graph for this function:

◆ testAbstractPathGetCurrentCid()

ilCtrlAbstractPathTest::testAbstractPathGetCurrentCid ( )

Definition at line 31 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

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

◆ testAbstractPathGetNextCid()

ilCtrlAbstractPathTest::testAbstractPathGetNextCid ( )

Definition at line 43 of file ilCtrlAbstractPathTest.php.

References $path, and ilCtrlPathTestBase\getPath().

43  : void
44  {
45  $path = $this->getPath('1:2:3');
46  $this->assertEquals('2', $path->getNextCid(ilCtrlBaseClass2TestGUI::class));
47  $this->assertEquals('3', $path->getNextCid(ilCtrlCommandClass1TestGUI::class));
48  $this->assertNull($path->getNextCid(ilCtrlCommandClass2TestGUI::class));
49 
50  $path = $this->getPath('');
51  $this->assertNull($path->getNextCid(ilCtrlBaseClass1TestGUI::class));
52 
53  $path = $this->getPath();
54  $this->assertNull($path->getNextCid(ilCtrlBaseClass1TestGUI::class));
55  }
$path
Definition: ltiservices.php:32
getPath(string $cid_path=null)
+ Here is the call graph for this function:

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