ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 @inheritDoc More...
 
- Protected Member Functions inherited from ilCtrlPathTestBase
 setUp ()
 @inheritDoc More...
 
 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

@inheritDoc

Reimplemented from ilCtrlPathTestBase.

Definition at line 38 of file ilCtrlPathFactoryTest.php.

38 : void
39 {
40 parent::setUp();
41
42 $this->factory = new ilCtrlPathFactory($this->structure);
43 }
factory()
Class ilCtrlPathFactory.

References factory().

+ Here is the call graph for this function:

◆ testPathFactoryExistingPath()

ilCtrlPathFactoryTest::testPathFactoryExistingPath ( )

Definition at line 83 of file ilCtrlPathFactoryTest.php.

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 }
$path
Definition: ltiservices.php:30

References $path, and factory().

+ Here is the call graph for this function:

◆ testPathFactoryFindArrayClassTargetPath()

ilCtrlPathFactoryTest::testPathFactoryFindArrayClassTargetPath ( )

Definition at line 57 of file ilCtrlPathFactoryTest.php.

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

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

+ Here is the call graph for this function:

◆ testPathFactoryFindSingleClassTargetPath()

ilCtrlPathFactoryTest::testPathFactoryFindSingleClassTargetPath ( )

Definition at line 45 of file ilCtrlPathFactoryTest.php.

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 }

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

+ Here is the call graph for this function:

◆ testPathFactoryNullPath()

ilCtrlPathFactoryTest::testPathFactoryNullPath ( )

Definition at line 72 of file ilCtrlPathFactoryTest.php.

72 : void
73 {
74 $path = $this->factory->null();
75
76 $this->assertNull($path->getCidPath());
77 $this->assertInstanceOf(
78 ilCtrlNullPath::class,
79 $path
80 );
81 }

References $path, and factory().

+ 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: