Definition at line 28 of file ViewControlGroupTest.php.
◆ testViewControlGroupCreation()
ViewControlGroupTest::testViewControlGroupCreation |
( |
| ) |
|
◆ testViewControlGroupGetContent()
ViewControlGroupTest::testViewControlGroupGetContent |
( |
| ) |
|
Definition at line 40 of file ViewControlGroupTest.php.
40 : void
41 {
43 $input = $this->createMock(InputData::class);
45
47 [
51 [
52 'a' =>
new Order(
'field1',
'ASC'),
53 'b' =>
new Order(
'field2',
'ASC')]
54 )
55 ]
56 )
57 ->withNameFrom($namesource)
58 ->withInput($input);
59
60 $this->assertInstanceOf(
Result\Ok::class, $group->getContent());
61 $this->assertCount(3, $group->getContent()->value());
62 list(
$a,
$b,
$c) = $group->getContent()->value();
63 $this->assertNull(
$a);
64 $this->assertInstanceOf(Range::class,
$b);
65 $this->assertInstanceOf(Order::class,
$c);
66 }
Both the subject and the direction need to be specified when expressing an order.
A result encapsulates a value or an error and simplifies the handling of those.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
References Vendor\Package\$a, Vendor\Package\$b, $c, Vendor\Package\$f, and ViewControlTestBase\buildVCFactory().
◆ testViewControlGroupRendering()
ViewControlGroupTest::testViewControlGroupRendering |
( |
| ) |
|
Definition at line 68 of file ViewControlGroupTest.php.
68 : void
69 {
72 [
75 ->withLimitOptions([2, 5, 10])
76 ->withTotalCount(12)
79 'a' =>
new Order(
'field1',
'ASC'),
80 'b' =>
new Order(
'field2',
'ASC')
81 ])
83 $f->fieldSelection([
'A',
'B'])
85 ]
86 );
87
88 $html = $this->brutallyTrimHTML($this->getDefaultRenderer()->render($group));
89 $this->assertStringContainsString('il-viewcontrol il-viewcontrol-pagination', $html);
90 $this->assertStringContainsString('il-viewcontrol il-viewcontrol-sortation', $html);
91 $this->assertStringContainsString('il-viewcontrol il-viewcontrol-fieldselection', $html);
92 }
References Vendor\Package\$f, and ViewControlTestBase\buildVCFactory().
The documentation for this class was generated from the following file: