Tests for the Alignment Layout.
More...
Tests for the Alignment Layout.
Definition at line 30 of file AlignmentTest.php.
◆ testAlignmentBasicConstruction()
| AlignmentTest::testAlignmentBasicConstruction |
( |
| ) |
|
Definition at line 32 of file AlignmentTest.php.
References Vendor\Package\$f.
34 $f =
new C\Layout\Alignment\Factory();
36 new C\Legacy\Legacy(
'block',
new C\SignalGenerator()),
37 new C\Legacy\Legacy(
'block',
new C\SignalGenerator())
39 $vert =
$f->vertical(...$blocks);
40 $this->assertInstanceOf(
I\Layout\
Alignment\Alignment::class, $vert);
41 $this->assertEquals($blocks, $vert->getBlocks());
42 $ed =
$f->horizontal()->dynamicallyDistributed(...$blocks);
43 $this->assertInstanceOf(
I\Layout\
Alignment\Alignment::class, $ed);
44 $this->assertEquals($blocks, $ed->getBlocks());
45 $dd =
$f->horizontal()->dynamicallyDistributed(...$blocks);
46 $this->assertInstanceOf(
I\Layout\
Alignment\Alignment::class, $dd);
47 $this->assertEquals($blocks, $dd->getBlocks());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testAlignmentDynamicalRendering()
| AlignmentTest::testAlignmentDynamicalRendering |
( |
| ) |
|
Definition at line 71 of file AlignmentTest.php.
References Vendor\Package\$f, and $renderer.
73 $f =
new C\Layout\Alignment\Factory();
75 new C\Legacy\Legacy(
'block',
new C\SignalGenerator()),
76 new C\Legacy\Legacy(
'block',
new C\SignalGenerator())
80 $dd =
$f->horizontal()->dynamicallyDistributed(...$blocks);
81 $actual = $this->brutallyTrimHTML(
$renderer->render($dd));
82 $expected = $this->brutallyTrimHTML(
' 83 <div class="c-layout-alignment c-layout-alignment--horizontal-dynamically"> 84 <div class=c-layout-alignment__block>block</div> 85 <div class=c-layout-alignment__block>block</div> 88 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testAlignmentEvenlyRendering()
| AlignmentTest::testAlignmentEvenlyRendering |
( |
| ) |
|
Definition at line 50 of file AlignmentTest.php.
References Vendor\Package\$f, and $renderer.
52 $f =
new C\Layout\Alignment\Factory();
54 new C\Legacy\Legacy(
'block',
new C\SignalGenerator()),
55 new C\Legacy\Legacy(
'block',
new C\SignalGenerator())
59 $ed =
$f->horizontal()->evenlyDistributed(...$blocks);
61 $actual = $this->brutallyTrimHTML(
$renderer->render($ed));
62 $expected = $this->brutallyTrimHTML(
' 63 <div class="c-layout-alignment c-layout-alignment--horizontal-evenly"> 64 <div class=c-layout-alignment__block>block</div> 65 <div class=c-layout-alignment__block>block</div> 68 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testAlignmentVerticalRendering()
| AlignmentTest::testAlignmentVerticalRendering |
( |
| ) |
|
Definition at line 91 of file AlignmentTest.php.
References Vendor\Package\$f, and $renderer.
93 $f =
new C\Layout\Alignment\Factory();
95 new C\Legacy\Legacy(
'block',
new C\SignalGenerator()),
96 new C\Legacy\Legacy(
'block',
new C\SignalGenerator())
100 $vert =
$f->vertical(...$blocks);
101 $actual = $this->brutallyTrimHTML(
$renderer->render($vert));
102 $expected = $this->brutallyTrimHTML(
' 103 <div class="c-layout-alignment c-layout-alignment--vertical"> 104 <div class=c-layout-alignment__block>block</div> 105 <div class=c-layout-alignment__block>block</div> 108 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
The documentation for this class was generated from the following file: