19declare(strict_types=1);
29require_once(
'ViewControlTestBase.php');
40 $this->assertInstanceOf(Signal::class, $vc->getInternalSignal());
41 $this->assertEquals($options, $vc->getOptions());
42 $this->assertEquals(
'', $vc->getButtonLabel());
47 $this->expectException(\Exception::class);
54 ->withValue(
'notokvalue,something');
66 $input = $this->createMock(InputData::class);
67 $input->expects($this->once())
77 $df->ok([
'opt1',
'opt2']),
80 $this->assertEquals($v, $vc->getValue());
85 $r = $this->getDefaultRenderer();
93 $expected = $this->brutallyTrimHTML(
'
94<div class="dropdown il-viewcontrol il-viewcontrol-fieldselection l-bar__element" id="id_3">
95 <button class="btn btn-ctrl dropdown-toggle" type="button" data-toggle="dropdown" aria-label="label_fieldselection" aria-haspopup="true" aria-expanded="false" aria-controls="id_3_ctrl"><span class="glyphicon-columnSelection"></span></button>
96 <div id="id_3_ctrl" class="dropdown-menu">
97 <ul class="dropdown-menu-list">
98 <li><input type="checkbox" value="opt1" id="id_1" /><label for="id_1">A</label></li>
99 <li><input type="checkbox" value="opt2" id="id_2" /><label for="id_2">B</label></li>
101 <button class="btn btn-default" id="id_4">label_fieldselection_refresh</button>
103 <div class="il-viewcontrol-value" role="none"></div>
106 $html = $this->brutallyTrimHTML($r->render($vc));
107 $this->assertEquals($expected, $html);
112 $this->expectException(\LogicException::class);
testViewControlFieldSelectionWithWrongValue()
testViewControlFieldSelectionWithInput()
testViewControlFieldSelectionConstruct()
testViewControlFieldSelectionRenderingOutsideContainer()
testViewControlFieldSelectionRendering()