5 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
9 use \ILIAS\UI\Implementation as
I;
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),
42 $this->createMock(
C\
Card\Factory::class)
48 return new \ILIAS\UI\Implementation\Component\Card\Factory();
54 $image =
new I\Component\Image\Image(
"standard",
"src",
"alt");
56 return $cf->standard(
"Card Title", $image);
61 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Card\\Standard", $this->
getBaseCard());
68 $this->assertEquals(
$c->getTitle(),
"Card Title");
74 $c =
$c->withTitle(
"Card Title New");
76 $this->assertEquals(
$c->getTitle(),
"Card Title New");
82 $c =
$c->withTitleAction(
"newAction");
83 $this->assertEquals(
"newAction",
$c->getTitleAction());
89 $c =
$c->withHighlight(
true);
90 $this->assertTrue(
$c->isHighlighted());
96 $image =
new I\Component\Image\Image(
"standard",
"src",
"alt");
98 $this->assertEquals($card->getImage(), $image);
104 $image_new =
new I\Component\Image\Image(
"standard",
"src/new",
"alt");
105 $c = $card->withImage($image_new);
107 $this->assertEquals(
$c->getImage(), $image_new);
114 $content =
$f->legacy(
"Random Content");
115 $c =
$c->withSections(array($content));
117 $this->assertEquals(
$c->getSections(), array($content));
123 $action =
"https://www.ilias.de";
126 $this->assertEquals(
$c->getImageAction(),
$action);
135 $content =
new I\Component\Legacy\Legacy(
"Random Content");
137 $c =
$c->withSections(array($content));
142 "<div class=\"il-card thumbnail\">" .
143 " <img src=\"src\" class=\"img-standard\" alt=\"alt\" />" .
144 " <div class=\"card-no-highlight\"></div>" .
145 " <div class=\"caption\">" .
146 " <h5 class=\"card-title\">Card Title</h5>" .
148 " <div class=\"caption\">Random Content</div>" .
158 $c =
$c->withHighlight(
true);
163 "<div class=\"il-card thumbnail\">" .
164 " <img src=\"src\" class=\"img-standard\" alt=\"alt\" />" .
165 " <div class=\"card-highlight\"></div>" .
166 " <div class=\"caption\">" .
167 " <h5 class=\"card-title\">Card Title</h5>" .
test_render_content_full()
getDefaultRenderer(JavaScriptBinding $js_binding=null)
Test on card implementation.
test_render_content_with_highlight()
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
test_implements_factory_interface()