Class ilCtrlArrayClassPathTest.  
 More...
◆ testArrayPathWithContextAndProvidedBaseClass()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithContextAndProvidedBaseClass  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 121 of file ilCtrlArrayClassPathTest.php.
References $context, $path, and ilCtrlPathTestBase\getPath().
  125         $context = $this->createMock(ilCtrlContextInterface::class);
   128             ->willReturn($this->
getPath(
'0:2'));
   130         $new_base_class = ilCtrlBaseClass2TestGUI::class;
   131         $first_target_class = ilCtrlCommandClass1TestGUI::class;
   132         $second_target_class = ilCtrlCommandClass2TestGUI::class;
   136             [$new_base_class, $first_target_class, $second_target_class]
   139         $this->assertEquals(
'1:2:3', 
$path->getCidPath());
 
Class ilCtrlArrayClassPath. 
 
getPath(string $cid_path=null)
 
 
 
 
◆ testArrayPathWithContextBaseClass()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithContextBaseClass  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 102 of file ilCtrlArrayClassPathTest.php.
References $context, $path, and ilCtrlPathTestBase\getPath().
  105         $context = $this->createMock(ilCtrlContextInterface::class);
   108             ->willReturn($this->
getPath(
'1:4'));
   110         $first_target_class = ilCtrlCommandClass1TestGUI::class;
   111         $second_target_class = ilCtrlCommandClass2TestGUI::class;
   115             [$first_target_class, $second_target_class]
   118         $this->assertEquals(
'1:2:3', 
$path->getCidPath());
 
Class ilCtrlArrayClassPath. 
 
getPath(string $cid_path=null)
 
 
 
 
◆ testArrayPathWithEmptyTargets()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithEmptyTargets  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 15 of file ilCtrlArrayClassPathTest.php.
References $path.
   19             $this->createMock(ilCtrlContextInterface::class),
    23         $this->assertNotNull(
$path->getException());
    24         $this->expectException(ilCtrlException::class);
    25         $this->expectExceptionMessage(ilCtrlArrayClassPath::class . 
'::getCidPathByArray must be provided with a list of classes.');
    26         throw $path->getException();
 Class ilCtrlArrayClassPath. 
 
 
 
 
◆ testArrayPathWithoutBaseClass()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithoutBaseClass  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 60 of file ilCtrlArrayClassPathTest.php.
References $context, $path, and ilCtrlPathTestBase\getPath().
   63         $context = $this->createMock(ilCtrlContextInterface::class);
    66             ->willReturn($this->
getPath(null));
    68         $first_target_class = ilCtrlCommandClass1TestGUI::class;
    69         $second_target_class = ilCtrlCommandClass2TestGUI::class;
    73             [$first_target_class, $second_target_class]
    76         $this->assertNotNull(
$path->getException());
    77         $this->expectException(ilCtrlException::class);
    78         $this->expectExceptionMessage(
"Class '$first_target_class' is not a baseclass and the current context doesn't have one either.");
    79         throw $path->getException();
 
Class ilCtrlArrayClassPath. 
 
getPath(string $cid_path=null)
 
 
 
 
◆ testArrayPathWithProvidedBaseClass()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithProvidedBaseClass  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 82 of file ilCtrlArrayClassPathTest.php.
References $context, $path, and ilCtrlPathTestBase\getPath().
   85         $context = $this->createMock(ilCtrlContextInterface::class);
    88             ->willReturn($this->
getPath(null));
    90         $base_class = ilCtrlBaseClass2TestGUI::class;
    91         $first_target_class = ilCtrlCommandClass1TestGUI::class;
    92         $second_target_class = ilCtrlCommandClass2TestGUI::class;
    96             [$base_class, $first_target_class, $second_target_class]
    99         $this->assertEquals(
'1:2:3', 
$path->getCidPath());
 
Class ilCtrlArrayClassPath. 
 
getPath(string $cid_path=null)
 
 
 
 
◆ testArrayPathWithUnknownTargetClass()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithUnknownTargetClass  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 29 of file ilCtrlArrayClassPathTest.php.
References $path.
   31         $invalid_class = ilCtrlInvalidGuiClass::class;
    34             $this->createMock(ilCtrlContextInterface::class),
    38         $this->assertNotNull(
$path->getException());
    39         $this->expectException(ilCtrlException::class);
    40         $this->expectExceptionMessage(
"Class '$invalid_class' was not found in the control structure, try `composer du` to read artifacts.");
    41         throw $path->getException();
 Class ilCtrlArrayClassPath. 
 
 
 
 
◆ testArrayPathWithUnrelatedTargets()
      
        
          | ilCtrlArrayClassPathTest::testArrayPathWithUnrelatedTargets  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 44 of file ilCtrlArrayClassPathTest.php.
References $path.
   46         $parent_class = ilCtrlBaseClass2TestGUI::class;
    47         $child_class = ilCtrlCommandClass2TestGUI::class;
    50             $this->createMock(ilCtrlContextInterface::class),
    51             [$parent_class, $child_class]
    54         $this->assertNotNull(
$path->getException());
    55         $this->expectException(ilCtrlException::class);
    56         $this->expectExceptionMessage(
"Class '$child_class' is not a child of '$parent_class'.");
    57         throw $path->getException();
 Class ilCtrlArrayClassPath. 
 
 
 
 
The documentation for this class was generated from the following file: