Definition at line 28 of file ViewControlTest.php.
 
◆ getSectionExpectedHTML()
  
  
      
        
          | ViewControlTest::getSectionExpectedHTML  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 172 of file ViewControlTest.php.
References ILIAS\Repository\button().
Referenced by testRenderViewControlSection().
  175 <div 
class=
"il-viewcontrol-section l-bar__element">
   176     <a 
class=
"btn btn-ctrl browse previous" href=
"http://www.ilias.de" aria-label=
"previous" data-action=
"http://www.ilias.de" id=
"id_1"><span 
class=
"glyphicon glyphicon-chevron-left"></span></a>
   177     <
button class=
"btn btn-default" data-action=
"">Today</button>
   178     <a 
class=
"btn btn-ctrl browse next" href=
"http://www.github.com" aria-label=
"next" data-action=
"http://www.github.com" id=
"id_2"><span 
class=
"glyphicon glyphicon-chevron-right"></span></a>
 button(string $caption, string $cmd)
 
 
 
 
◆ getUIFactory()
      
        
          | ViewControlTest::getUIFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 158 of file ViewControlTest.php.
References ILIAS\Repository\button().
  161             public function counter(): 
C\Counter\Factory
   163                 return new I\Component\Counter\Factory();
   167                 return new I\Component\Button\Factory();
 
button(string $caption, string $cmd)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ getViewControlFactory()
      
        
          | ViewControlTest::getViewControlFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testImplementsFactoryInterface()
      
        
          | ViewControlTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 44 of file ViewControlTest.php.
References getViewControlFactory().
   48         $back = 
new I\Component\Button\Standard(
"", 
"http://www.ilias.de");
    49         $next = 
new I\Component\Button\Standard(
"", 
"http://www.github.com");
    50         $button = 
new I\Component\Button\Standard(
"Today", 
"");
    52         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Button", $back);
    53         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Button", $next);
    54         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Button", $button);
    55         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\ViewControl\\Factory", $view_control_f);
    57         $section = $view_control_f->section($back, $button, $next);
    58         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\ViewControl\\Section", $section);
 
 
 
 
◆ testRenderViewControlSection()
      
        
          | ViewControlTest::testRenderViewControlSection  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 87 of file ViewControlTest.php.
References Vendor\Package\$f, $r, getSectionExpectedHTML(), and getViewControlFactory().
   92         $r = $this->getDefaultRenderer();
    94         $back = $button_f->standard(
"", 
"http://www.ilias.de");
    95         $next = $button_f->standard(
"", 
"http://www.github.com");
    96         $button = $button_f->standard(
"Today", 
"");
    98         $section = $view_control_f->section($back, $button, $next);
   100         $html = 
$r->render($section);
   101         $this->assertStringContainsString(
"glyphicon-chevron-left", $html);
   102         $this->assertStringContainsString(
"glyphicon-chevron-right", $html);
   103         $this->assertStringContainsString(
"il-viewcontrol-section", $html);
   104         $this->assertStringContainsString(
"btn", $html);
   107         $this->assertEquals($this->brutallyTrimHTML($expected), $this->brutallyTrimHTML($html));
   110         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\ViewControl\\Factory", 
$f);
 
 
 
 
◆ testViewControlGetActions()
      
        
          | ViewControlTest::testViewControlGetActions  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testViewControlModeRender()
      
        
          | ViewControlTest::testViewControlModeRender  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 128 of file ViewControlTest.php.
References Vendor\Package\$f, $r, and getViewControlFactory().
  131         $r = $this->getDefaultRenderer();
   132         $mode = 
$f->mode($this->actions, $this->aria_label);
   134         $html = $this->normalizeHTML(
$r->render($mode));
   136         $activate_first_item = 
false;
   139             $activate_first_item = 
true;
   142         $expected = 
"<div class=\"il-viewcontrol-mode l-bar__element\" aria-label=\"" . $this->aria_label . 
"\" role=\"" . $this->role . 
"\">";
   143         foreach ($this->actions as $label => $action) {
   144             if ($activate_first_item) {
   145                 $expected .= 
"<button class=\"btn btn-default engaged\" aria-pressed=\"true\" data-action=\"$action\" id=\"id_1\">$label</button>";
   146                 $activate_first_item = 
false;
   148                 $expected .= 
"<button class=\"btn btn-default engaged\" aria-pressed=\"true\" data-action=\"$action\" id=\"id_1\">$label</button>";
   150                 $expected .= 
"<button class=\"btn btn-default\" aria-pressed=\"false\" data-action=\"$action\" id=\"id_2\">$label</button>";
   153         $expected .= 
"</div>";
   155         $this->assertEquals($this->brutallyTrimHTML($expected), $this->brutallyTrimHTML($html));
 
 
 
 
◆ testViewControlSectionGetNextActions()
      
        
          | ViewControlTest::testViewControlSectionGetNextActions  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 74 of file ViewControlTest.php.
References getViewControlFactory().
   78         $back = $button_f->standard(
"", 
"http://www.ilias.de");
    79         $next = $button_f->standard(
"", 
"http://www.github.com");
    80         $button = $button_f->standard(
"Today", 
"");
    84         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Button", $action);
 
 
 
 
◆ testViewControlSectionGetPreviousActions()
      
        
          | ViewControlTest::testViewControlSectionGetPreviousActions  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 61 of file ViewControlTest.php.
References getViewControlFactory().
   65         $back = $button_f->standard(
"", 
"http://www.ilias.de");
    66         $next = $button_f->standard(
"", 
"http://www.github.com");
    67         $button = $button_f->standard(
"Today", 
"");
    71         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Button", $action);
 
 
 
 
◆ testViewControlWithActive()
      
        
          | ViewControlTest::testViewControlWithActive  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 113 of file ViewControlTest.php.
References Vendor\Package\$f, and getViewControlFactory().
  117         $this->assertEquals($this->active, 
$f->mode($this->actions, $this->aria_label)->withActive($this->active)->getActive());
   118         $this->assertNotEquals($this->active, 
$f->mode($this->actions, $this->aria_label)->withActive(
"Dummy text")->getActive());
 
 
 
 
◆ $actions
  
  
      
        
          | array ViewControlTest::$actions | 
         
       
   | 
  
protected   | 
  
 
 
◆ $active
  
  
      
        
          | string ViewControlTest::$active = "Github" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $aria_label
  
  
      
        
          | string ViewControlTest::$aria_label = "Mode View Controler" | 
         
       
   | 
  
protected   | 
  
 
 
◆ $role
  
  
      
        
          | string ViewControlTest::$role = "group" | 
         
       
   | 
  
protected   | 
  
 
 
◆ Github
      
        
          | array ViewControlTest::Github | 
        
      
 
 
The documentation for this class was generated from the following file: