3 declare(strict_types=1);
    16 require_once(
'IliasMocks.php');
    40     protected function setUp(): void
    42         $ui_factory = $this->mockUIFactory();
    43         $lang = $this->mockIlLanguage();
    46         $uri = $data_factory->uri(
'https://ilias.de/somepath');
    49         $uri = $data_factory->uri(
'http://ilias.de/some/other/path');
    57         $this->assertInstanceOf(ControlBuilder::class, $this->control_builder);
    62         $this->assertNull($this->control_builder->getExitControl());
    63         $this->assertNull($this->control_builder->getNextControl());
    64         $this->assertNull($this->control_builder->getPreviousControl());
    65         $this->assertNull($this->control_builder->getDoneControl());
    66         $this->assertEquals([], $this->control_builder->getControls());
    67         $this->assertNull($this->control_builder->getToc());
    72         $cb = $this->control_builder->exit(
'cmd');
    73         $this->assertInstanceOf(ControlBuilder::class, $cb);
    74         $this->assertInstanceOf(
Button\Bulky::class, $cb->getExitControl());
    81             $this->control_builder
    84             $this->assertFalse(
"This should not happen");
    86             $this->assertTrue(
true);
    92         $cb = $this->control_builder
    95         $this->assertInstanceOf(ControlBuilder::class, $cb);
    96         $this->assertInstanceOf(
Button\Standard::class, $cb->getPreviousControl());
    97         $this->assertInstanceOf(
Button\Standard::class, $cb->getNextControl());
   103             $this->control_builder
   105                 ->previous(
'cmd', 1);
   106             $this->assertFalse(
"This should not happen");
   108             $this->assertTrue(
true);
   115             $this->control_builder
   118             $this->assertFalse(
"This should not happen");
   120             $this->assertTrue(
true);
   126         $toc = $this->control_builder->tableOfContent(
'cmd', 
'rootnode');
   127         $this->assertInstanceOf(TOCBuilder::class, $toc);
   128         $this->assertEquals($toc, $this->control_builder->getToc());
   134             $this->control_builder->tableOfContent(
'cmd', 
'rootnode')
   136             $this->control_builder->tableOfContent(
'cmd', 
'rootnode');
   137             $this->assertFalse(
"This should not happen");
   139             $this->assertTrue(
true);
   145         $cb = $this->control_builder->generic(
'label', 
'cmd', 1);
   146         $this->assertInstanceOf(ControlBuilder::class, $cb);
   147         $this->assertInstanceOf(
Button\Standard::class, $cb->getControls()[0]);
   152         $cb = $this->control_builder
   153             ->generic(
'label', 
'cmd', 1)
   154             ->generic(
'label', 
'cmd', 2)
   155             ->generic(
'label', 
'cmd', 3);
   156         $this->assertCount(3, $cb->getControls());
   161         $cb = $this->control_builder->done(
'cmd', 1);
   162         $this->assertInstanceOf(ControlBuilder::class, $cb);
   163         $this->assertInstanceOf(
Button\Primary::class, $cb->getDoneControl());
   169             $this->control_builder
   172             $this->assertFalse(
"This should not happen");
   174             $this->assertTrue(
true);
   180         $cb = $this->control_builder->mode(
'cmd', [
'm1', 
'm2']);
   181         $this->assertInstanceOf(ControlBuilder::class, $cb);
   182         $this->assertInstanceOf(
ViewControl\Mode::class, $cb->getModeControls()[0]);
   187         $cb = $this->control_builder->locator(
'cmd');
   188         $this->assertInstanceOf(LocatorBuilder::class, $cb);
   194             $this->control_builder->locator(
'cmd')
   196             $this->control_builder->locator(
'cmd');
   197             $this->assertFalse(
"This should not happen");
   199             $this->assertTrue(
true);
 
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...
 
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...
 
LSControlBuilder $control_builder