11 require_once(
'IliasMocks.php');
19 $ui_factory = $this->mockUIFactory();
20 $lang = $this->mockIlLanguage();
23 $uri = $data_factory->uri(
'http://ilias.de/somepath');
32 $this->assertInstanceOf(ControlBuilder::class, $this->control_builder);
37 $this->assertNull($this->control_builder->getExitControl());
38 $this->assertNull($this->control_builder->getNextControl());
39 $this->assertNull($this->control_builder->getPreviousControl());
40 $this->assertNull($this->control_builder->getDoneControl());
41 $this->assertEquals([], $this->control_builder->getControls());
42 $this->assertNull($this->control_builder->getToc());
47 $cb = $this->control_builder->exit(
'cmd');
48 $this->assertInstanceOf(ControlBuilder::class, $cb);
49 $this->assertInstanceOf(
Button\Shy::class, $cb->getExitControl());
56 $cb = $this->control_builder
59 $this->assertFalse(
"This should not happen");
61 $this->assertTrue(
true);
67 $cb = $this->control_builder
70 $this->assertInstanceOf(ControlBuilder::class, $cb);
71 $this->assertInstanceOf(
Button\Standard::class, $cb->getPreviousControl());
72 $this->assertInstanceOf(
Button\Standard::class, $cb->getNextControl());
78 $cb = $this->control_builder
81 $this->assertFalse(
"This should not happen");
83 $this->assertTrue(
true);
90 $cb = $this->control_builder
93 $this->assertFalse(
"This should not happen");
95 $this->assertTrue(
true);
101 $toc = $this->control_builder->tableOfContent(
'cmd',
'rootnode');
102 $this->assertInstanceOf(TOCBuilder::class, $toc);
103 $this->assertEquals($toc, $this->control_builder->getToc());
109 $toc = $this->control_builder->tableOfContent(
'cmd',
'rootnode')
111 $toc = $this->control_builder->tableOfContent(
'cmd',
'rootnode');
112 $this->assertFalse(
"This should not happen");
114 $this->assertTrue(
true);
120 $cb = $this->control_builder->generic(
'label',
'cmd', 1);
121 $this->assertInstanceOf(ControlBuilder::class, $cb);
122 $this->assertInstanceOf(
Button\Standard::class, $cb->getControls()[0]);
127 $cb = $this->control_builder
128 ->generic(
'label',
'cmd', 1)
129 ->generic(
'label',
'cmd', 2)
130 ->generic(
'label',
'cmd', 3);
131 $this->assertEquals(3, count($cb->getControls()));
136 $cb = $this->control_builder->done(
'cmd', 1);
137 $this->assertInstanceOf(ControlBuilder::class, $cb);
138 $this->assertInstanceOf(
Button\Primary::class, $cb->getDoneControl());
144 $cb = $this->control_builder
147 $this->assertFalse(
"This should not happen");
149 $this->assertTrue(
true);
155 $cb = $this->control_builder->mode(
'cmd', [
'm1',
'm2']);
156 $this->assertInstanceOf(ControlBuilder::class, $cb);
157 $this->assertInstanceOf(ViewControl\Mode::class, $cb->getModeControls()[0]);
162 $cb = $this->control_builder->locator(
'cmd');
163 $this->assertInstanceOf(LocatorBuilder::class, $cb);
169 $loc = $this->control_builder->locator(
'cmd')
171 $loc = $this->control_builder->locator(
'cmd');
172 $this->assertFalse(
"This should not happen");
174 $this->assertTrue(
true);
Global Settings of the Learning Sequence.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang