Test secondary listing panels.  
 More...
Test secondary listing panels. 
Definition at line 31 of file PanelSecondaryListingTest.php.
 
◆ cleanHTML()
  
  
      
        
          | PanelSecondaryListingTest::cleanHTML  | 
          ( | 
          string  | 
          $html | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ getUIFactory()
      
        
          | PanelSecondaryListingTest::getUIFactory  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 33 of file PanelSecondaryListingTest.php.
References ILIAS\Repository\button(), and ILIAS\Repository\symbol().
Referenced by testGetItemGroups(), testGetTitle(), testImplementsFactoryInterface(), testRenderWithActions(), testRenderWithFooter(), testRenderWithNoHeaderButContent(), testRenderWithNoHeaderNoContentNoFooter(), testRenderWithPagination(), testRenderWithSection(), testRenderWithSortation(), and testWithActions().
   38                 return new I\Component\Panel\Secondary\Factory();
    41             public function dropdown(): 
C\Dropdown\
Factory    43                 return new I\Component\Dropdown\Factory();
    53                 return new I\Component\Button\Factory();
    58                 return new I\Component\Symbol\Factory(
 
button(string $caption, string $cmd)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testGetItemGroups()
      
        
          | PanelSecondaryListingTest::testGetItemGroups  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testGetTitle()
      
        
          | PanelSecondaryListingTest::testGetTitle  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testImplementsFactoryInterface()
      
        
          | PanelSecondaryListingTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 74 of file PanelSecondaryListingTest.php.
References getUIFactory(), and ILIAS\UI\Implementation\Component\Input\Group.
   76         $secondary_panel = $this->
getUIFactory()->panelSecondary()->listing(
"List Title", array(
    87         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Secondary\\Listing", $secondary_panel);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ testRenderWithActions()
      
        
          | PanelSecondaryListingTest::testRenderWithActions  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 141 of file PanelSecondaryListingTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS\Repository\button(), ILIAS_UI_TestBase\getDefaultRenderer(), and getUIFactory().
  143         $actions = $this->
getUIFactory()->dropdown()->standard(array(
   148         $sec = $this->
getUIFactory()->panelSecondary()->listing(
"Title", array())->withActions($actions);
   152         $expected_html = <<<EOT
   153 <div 
class=
"panel panel-secondary panel-flex">
   154     <div 
class=
"panel-heading ilHeader">
   155         <div 
class=
"panel-title"><h2>
Title</h2></div>
   156         <div 
class=
"panel-controls">
   157             <div 
class=
"dropdown"><
button class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" id=
"id_3" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_3_menu"><span 
class=
"caret"></span></
button>
   158                 <ul 
id=
"id_3_menu" class=
"dropdown-menu">
   159                     <li><
button class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
   160                     <li><button 
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">Github</button></li>
   165     <div 
class=
"panel-body">
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
button(string $caption, string $cmd)
 
Class ChatMainBarProvider . 
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
 
 
 
◆ testRenderWithFooter()
      
        
          | PanelSecondaryListingTest::testRenderWithFooter  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testRenderWithNoHeaderButContent()
      
        
          | PanelSecondaryListingTest::testRenderWithNoHeaderButContent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 322 of file PanelSecondaryListingTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS_UI_TestBase\getDefaultRenderer(), getUIFactory(), and ILIAS\UI\Implementation\Component\Input\Group.
  331         $secondary_panel = $this->
getUIFactory()->panelSecondary()->listing(
"", array($group));
   335         $expected_html = <<<EOT
   336 <div 
class=
"panel panel-secondary panel-flex">
   337   <div 
class=
"panel-body">
   338     <div 
class=
"il-item-group">
   340       <div 
class=
"il-item-group-items">
   342             <li 
class=
"il-std-item-container">
   343               <div 
class=
"il-item il-std-item ">
   344                 <h4 
class=
"il-item-title">title1</h4>
   347             <li 
class=
"il-std-item-container">
   348               <div 
class=
"il-item il-std-item ">
   349                 <h4 
class=
"il-item-title">title2</h4>
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
 
 
 
 
◆ testRenderWithNoHeaderNoContentNoFooter()
      
        
          | PanelSecondaryListingTest::testRenderWithNoHeaderNoContentNoFooter  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testRenderWithPagination()
      
        
          | PanelSecondaryListingTest::testRenderWithPagination  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 216 of file PanelSecondaryListingTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS\Repository\button(), ILIAS_UI_TestBase\getDefaultRenderer(), and getUIFactory().
  218         $pagination = $this->
getUIFactory()->viewControl()->pagination()
   219             ->withTargetURL(
'http://ilias.de', 
'page')
   220             ->withTotalEntries(10)
   222             ->withCurrentPage(1);
   224         $sec = $this->
getUIFactory()->panelSecondary()->listing(
"Title", array())
   225             ->withViewControls([$pagination]);
   229         $expected_html = <<<EOT
   230 <div 
class=
"panel panel-secondary panel-flex">
   231     <div 
class=
"panel-heading ilHeader">
   232         <div 
class=
"panel-title"><h2>
Title</h2></div>
   233         <div 
class=
"panel-viewcontrols l-bar__space-keeper">
   234             <div 
class=
"il-viewcontrol-pagination l-bar__element">
   235                 <span 
class=
"btn btn-ctrl browse previous">
   236                     <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=0" aria-label=
"back">
   237                         <span 
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
   240                 <
button class=
"btn btn-link" data-action=
"http://ilias.de?page=0" id=
"id_1">1</button>
   241                 <button 
class=
"btn btn-link engaged" aria-pressed=
"true" data-action=
"http://ilias.de?page=1" id=
"id_2">2</button>
   242                 <button 
class=
"btn btn-link" data-action=
"http://ilias.de?page=2" id=
"id_3">3</button>
   243                 <button 
class=
"btn btn-link" data-action=
"http://ilias.de?page=3" id=
"id_4">4</button>
   244                 <button 
class=
"btn btn-link" data-action=
"http://ilias.de?page=4" id=
"id_5">5</button>
   245                 <span 
class=
"btn btn-ctrl browse next">
   246                     <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=2" aria-label=
"next">
   247                         <span 
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
   252         <div 
class=
"panel-controls"></div>
   254     <div 
class=
"panel-body">
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
button(string $caption, string $cmd)
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
 
 
 
◆ testRenderWithSection()
      
        
          | PanelSecondaryListingTest::testRenderWithSection  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 264 of file PanelSecondaryListingTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS\Repository\button(), ILIAS_UI_TestBase\getDefaultRenderer(), and getUIFactory().
  266         $back = $this->
getUIFactory()->button()->standard(
"previous", 
"http://www.ilias.de");
   267         $next = $this->
getUIFactory()->button()->standard(
"next", 
"http://www.github.com");
   268         $current = $this->
getUIFactory()->button()->standard(
"current", 
"");
   269         $section = $this->
getUIFactory()->viewControl()->section($back, $current, $next);
   271         $secondary_panel = $this->
getUIFactory()->panelSecondary()->listing(
"Title", array())
   272             ->withViewControls([$section]);
   276         $expected_html = <<<EOT
   277 <div 
class=
"panel panel-secondary panel-flex">
   278     <div 
class=
"panel-heading ilHeader">
   279         <div 
class=
"panel-title"><h2>
Title</h2></div>
   280         <div 
class=
"panel-viewcontrols l-bar__space-keeper">
   281             <div 
class=
"il-viewcontrol-section l-bar__element">
   282                 <a 
class=
"btn btn-ctrl browse previous" href=
"http://www.ilias.de" aria-label=
"previous" data-action=
"http://www.ilias.de" id=
"id_1">
   283                     <span 
class=
"glyphicon glyphicon-chevron-left"></span>
   285                 <
button class=
"btn btn-default" data-action=
"">current</button>
   286                 <a 
class=
"btn btn-ctrl browse next" href=
"http://www.github.com" aria-label=
"next" data-action=
"http://www.github.com" id=
"id_2">
   287                     <span 
class=
"glyphicon glyphicon-chevron-right"></span>
   291         <div 
class=
"panel-controls"></div>
   293     <div 
class=
"panel-body">
 getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
button(string $caption, string $cmd)
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
 
 
 
◆ testRenderWithSortation()
      
        
          | PanelSecondaryListingTest::testRenderWithSortation  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 175 of file PanelSecondaryListingTest.php.
References ILIAS_UI_TestBase\brutallyTrimHTML(), ILIAS\Repository\button(), ILIAS_UI_TestBase\getDefaultRenderer(), and getUIFactory().
  177         $sort_options = array(
   181         $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
   182         $sec = $this->
getUIFactory()->panelSecondary()->listing(
"Title", array())
   183             ->withViewControls([$sortation]);
   187         $expected_html = <<<EOT
   188 <div 
class=
"panel panel-secondary panel-flex">
   189     <div 
class=
"panel-heading ilHeader">
   190         <div 
class=
"panel-title"><h2>
Title</h2></div>
   191         <div 
class=
"panel-viewcontrols l-bar__space-keeper">
   192             <div 
class=
"il-viewcontrol-sortation l-bar__element" id=
"id_1">
   193                 <div 
class=
"dropdown">
   194                     <
button class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" id=
"id_4" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_4_menu">
   195                         <span 
class=
"caret"></span>
   197                     <ul 
id=
"id_4_menu" class=
"dropdown-menu">
   198                         <li><
button class=
"btn btn-link" data-action=
"?sortation=a" id=
"id_2">
A</button></li>
   199                         <li><button 
class=
"btn btn-link" data-action=
"?sortation=b" id=
"id_3">
B</button></li>
   204         <div 
class=
"panel-controls"></div>
   206     <div 
class=
"panel-body">
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
button(string $caption, string $cmd)
 
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML. 
 
 
 
 
◆ testWithActions()
      
        
          | PanelSecondaryListingTest::testWithActions  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 124 of file PanelSecondaryListingTest.php.
References Vendor\Package\$c, and getUIFactory().
  126         $actions = 
new I\Component\Dropdown\Standard(array(
   133         $c = $this->
getUIFactory()->panelSecondary()->listing(
"title", $groups)
   134             ->withActions($actions);
   136         $this->assertEquals(
$c->getActions(), $actions);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
The documentation for this class was generated from the following file: