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

Class ilCtrlPathFactoryTest. More...

+ Inheritance diagram for ilCtrlPathFactoryTest:
+ Collaboration diagram for ilCtrlPathFactoryTest:

Public Member Functions

 testPathFactoryFindSingleClassTargetPath ()
 
 testPathFactoryFindArrayClassTargetPath ()
 
 testPathFactoryNullPath ()
 
 testPathFactoryExistingPath ()
 

Protected Member Functions

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

Private Attributes

ilCtrlPathFactory $factory
 

Additional Inherited Members

- Protected Attributes inherited from ilCtrlPathTestBase
ilCtrlStructureInterface $structure
 

Detailed Description

Member Function Documentation

◆ setUp()

ilCtrlPathFactoryTest::setUp ( )
protected

Definition at line 38 of file ilCtrlPathFactoryTest.php.

References factory().

38  : void
39  {
40  parent::setUp();
41 
42  $this->factory = new ilCtrlPathFactory($this->structure);
43  }
Class ilCtrlPathFactory.
factory()
+ Here is the call graph for this function:

◆ testPathFactoryExistingPath()

ilCtrlPathFactoryTest::testPathFactoryExistingPath ( )

Definition at line 83 of file ilCtrlPathFactoryTest.php.

References $path, and factory().

83  : void
84  {
85  $path = $this->factory->existing('foo');
86 
87  $this->assertEquals('foo', $path->getCidPath());
88  $this->assertInstanceOf(
89  ilCtrlExistingPath::class,
90  $path
91  );
92  }
factory()
$path
Definition: ltiservices.php:29
+ Here is the call graph for this function:

◆ testPathFactoryFindArrayClassTargetPath()

ilCtrlPathFactoryTest::testPathFactoryFindArrayClassTargetPath ( )

Definition at line 57 of file ilCtrlPathFactoryTest.php.

References $context, $path, and factory().

57  : void
58  {
59  $context = $this->createMock(ilCtrlContextInterface::class);
60  $path = $this->factory->find($context, [
61  ilCtrlBaseClass1TestGUI::class,
62  ilCtrlCommandClass1TestGUI::class,
63  ]);
64 
65  $this->assertEquals('0:2', $path->getCidPath());
66  $this->assertInstanceOf(
67  ilCtrlArrayClassPath::class,
68  $path
69  );
70  }
$context
Definition: webdav.php:31
factory()
$path
Definition: ltiservices.php:29
+ Here is the call graph for this function:

◆ testPathFactoryFindSingleClassTargetPath()

ilCtrlPathFactoryTest::testPathFactoryFindSingleClassTargetPath ( )

Definition at line 45 of file ilCtrlPathFactoryTest.php.

References $context, $path, and factory().

45  : void
46  {
47  $context = $this->createMock(ilCtrlContextInterface::class);
48  $path = $this->factory->find($context, ilCtrlBaseClass1TestGUI::class);
49 
50  $this->assertEquals('0', $path->getCidPath());
51  $this->assertInstanceOf(
52  ilCtrlSingleClassPath::class,
53  $path
54  );
55  }
$context
Definition: webdav.php:31
factory()
$path
Definition: ltiservices.php:29
+ Here is the call graph for this function:

◆ testPathFactoryNullPath()

ilCtrlPathFactoryTest::testPathFactoryNullPath ( )

Definition at line 72 of file ilCtrlPathFactoryTest.php.

References $path, and factory().

72  : void
73  {
74  $path = $this->factory->null();
75 
76  $this->assertNull($path->getCidPath());
77  $this->assertInstanceOf(
78  ilCtrlNullPath::class,
79  $path
80  );
81  }
factory()
$path
Definition: ltiservices.php:29
+ Here is the call graph for this function:

Field Documentation

◆ $factory

ilCtrlPathFactory ilCtrlPathFactoryTest::$factory
private

Definition at line 33 of file ilCtrlPathFactoryTest.php.


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