19 declare(strict_types=1);
29 require_once(
'ViewControlTestBase.php');
40 $this->assertEquals($options, $vc->getOptions());
45 $this->expectException(\Exception::class);
64 $input = $this->createMock(InputData::class);
65 $input->expects($this->once())
78 $this->assertEquals($v, $vc->getValue());
83 $r = $this->getDefaultRenderer();
91 $expected = $this->brutallyTrimHTML(
' 92 <div class="il-viewcontrol il-viewcontrol-mode l-bar__element" aria-label="label_modeviewcontrol" role="group"> 93 <button class="btn btn-default engaged" aria-pressed="true" data-action="#" id="id_1">A</button> 94 <button class="btn btn-default" aria-pressed="false" data-action="#" id="id_2">B</button> 95 <div class="il-viewcontrol-value" role="none"> 96 <input type="hidden" name="" value="opt1" /> 100 $html = $this->brutallyTrimHTML(
$r->render($vc));
101 $this->assertEquals($expected, $html);
106 $this->expectException(\LogicException::class);
112 $this->expectException(\InvalidArgumentException::class);
118 $this->expectException(\InvalidArgumentException::class);
testViewControlModeWithInput()
testViewControlModeWithoutOptions()
testViewControlFieldSelectionConstruct()
testViewControlModeWithWrongValue()
testViewControlModeWithWrongOptions()
testViewControlModeRendering()
testViewControlModeRenderingOutsideContainer()