19 declare(strict_types=1);
28 require_once(
'ViewControlBaseTest.php');
35 $vc1 =
$f->nullControl();
36 $vc2 =
$f->pagination();
37 $group =
$f->group([$vc1, $vc2]);
39 $this->assertEquals([$vc1, $vc2], $group->getInputs());
45 $input = $this->createMock(InputData::class);
54 'a' =>
new Order(
'field1',
'ASC'),
55 'b' =>
new Order(
'field2',
'ASC')]
62 $this->assertInstanceOf(
Result\Ok::class, $group->getContent());
63 $this->assertCount(3, $group->getContent()->value());
64 list(
$a,
$b,
$c) = $group->getContent()->value();
65 $this->assertNull(
$a);
66 $this->assertInstanceOf(Range::class,
$b);
67 $this->assertInstanceOf(Order::class,
$c);
77 ->withLimitOptions([2, 5, 10])
81 'a' =>
new Order(
'field1',
'ASC'),
82 'b' =>
new Order(
'field2',
'ASC')
85 $f->fieldSelection([
'A',
'B'])
91 $this->assertStringContainsString(
'il-viewcontrol il-viewcontrol-pagination', $html);
92 $this->assertStringContainsString(
'il-viewcontrol il-viewcontrol-sortation', $html);
93 $this->assertStringContainsString(
'il-viewcontrol il-viewcontrol-fieldselection', $html);
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
testViewControlGroupRendering()
testViewControlGroupGetContent()
A result encapsulates a value or an error and simplifies the handling of those.
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
Both the subject and the direction need to be specified when expressing an order. ...
testViewControlGroupCreation()
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples