Test on deck implementation.
More...
Test on deck implementation.
Definition at line 14 of file DeckTest.php.
◆ getFactory()
- Returns
Definition at line 20 of file DeckTest.php.
Referenced by test_get_cards(), test_get_size(), test_implements_factory_interface(), test_render_content(), test_with_cards(), and test_with_size().
22 return new \ILIAS\UI\Implementation\Factory(
23 $this->createMock(
C\Counter\Factory::class),
24 $this->createMock(
C\Glyph\Factory::class),
25 $this->createMock(
C\
Button\Factory::class),
26 $this->createMock(
C\Listing\Factory::class),
27 $this->createMock(
C\Image\Factory::class),
28 $this->createMock(
C\Panel\Factory::class),
29 $this->createMock(
C\Modal\Factory::class),
30 $this->createMock(
C\Dropzone\Factory::class),
31 $this->createMock(
C\Popover\Factory::class),
32 $this->createMock(
C\Divider\Factory::class),
33 $this->createMock(
C\Link\Factory::class),
34 $this->createMock(
C\Dropdown\Factory::class),
35 $this->createMock(
C\Item\Factory::class),
36 $this->createMock(
C\Icon\Factory::class),
37 $this->createMock(
C\ViewControl\Factory::class),
38 $this->createMock(
C\Chart\Factory::class),
39 $this->createMock(
C\Input\Factory::class),
40 $this->createMock(
C\Table\Factory::class),
41 $this->createMock(
C\MessageBox\Factory::class),
◆ test_get_cards()
DeckTest::test_get_cards |
( |
| ) |
|
Definition at line 55 of file DeckTest.php.
References $c, $d, $f, and getFactory().
58 $c =
$f->card()->standard(
"Card Title");
61 $this->assertEquals(
$d->getCards(), array(
$c));
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
◆ test_get_size()
DeckTest::test_get_size |
( |
| ) |
|
Definition at line 74 of file DeckTest.php.
References $c, $d, $f, and getFactory().
78 $c =
$f->card()->standard(
"Card Title");
81 $this->assertEquals(
$d->getCardsSize(), C\Deck\Deck::SIZE_S);
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
◆ test_implements_factory_interface()
DeckTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 46 of file DeckTest.php.
References $c, $f, and getFactory().
50 $this->assertInstanceOf(
"ILIAS\\UI\\Factory",
$f);
51 $c =
$f->card()->standard(
"Card Title");
52 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Deck\\Deck",
$f->deck(array(
$c)));
◆ test_render_content()
DeckTest::test_render_content |
( |
| ) |
|
Definition at line 110 of file DeckTest.php.
References $c, $d, $f, $html, $r, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
114 $c =
$f->card()->standard(
"Card Title");
122 '<div class="il-deck"> 123 <div class="row row-eq-height"> 124 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 125 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 126 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 128 <div class="row row-eq-height"> 129 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 130 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 131 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div> 133 <div class="row row-eq-height"> 134 <div class="col-sm-12 col-md-4"><div class="il-card thumbnail"><div class="card-no-highlight"></div><div class="caption"><h5 class="card-title">Card Title</h5></div></div></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
◆ test_with_cards()
DeckTest::test_with_cards |
( |
| ) |
|
Definition at line 64 of file DeckTest.php.
References $c, $d, $f, and getFactory().
67 $c =
$f->card()->standard(
"Card Title");
71 $this->assertEquals(
$d->getCards(), array(
$c,
$c));
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
◆ test_with_size()
DeckTest::test_with_size |
( |
| ) |
|
Definition at line 84 of file DeckTest.php.
References $c, $d, $f, and getFactory().
88 $c =
$f->card()->standard(
"Card Title");
91 $d =
$d->withExtraSmallCardsSize();
92 $this->assertEquals(
$d->getCardsSize(), C\Deck\Deck::SIZE_XS);
94 $d = $d->withSmallCardsSize();
95 $this->assertEquals($d->getCardsSize(), C\Deck\Deck::SIZE_S);
97 $d = $d->withNormalCardsSize();
98 $this->assertEquals($d->getCardsSize(), C\Deck\Deck::SIZE_M);
100 $d = $d->withLargeCardsSize();
101 $this->assertEquals($d->getCardsSize(), C\Deck\Deck::SIZE_L);
103 $d = $d->withExtraLargeCardsSize();
104 $this->assertEquals($d->getCardsSize(), C\Deck\Deck::SIZE_XL);
106 $d = $d->withFullSizedCardsSize();
107 $this->assertEquals($d->getCardsSize(), C\Deck\Deck::SIZE_FULL);
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
The documentation for this class was generated from the following file: