5 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
21 return new \ILIAS\UI\Implementation\Component\Listing\Factory();
29 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Listing\\Factory",
$f);
30 $this->assertInstanceOf(
31 "ILIAS\\UI\\Component\\Listing\\Ordered",
32 $f->ordered(array(
"1"))
34 $this->assertInstanceOf(
35 "ILIAS\\UI\\Component\\Listing\\Unordered",
36 $f->unordered(array(
"1"))
38 $this->assertInstanceOf(
39 "ILIAS\\UI\\Component\\Listing\\Descriptive",
40 $f->descriptive(array(
"k1" =>
"c1"))
43 $this->assertInstanceOf(
44 "ILIAS\\UI\\Component\\Listing\\CharacteristicValue\\Factory",
45 $f->characteristicValue()
53 $l =
$f->ordered(array(
"1",
"2"));
55 $items = array(
"1",
"2");
56 $this->assertEquals($l->getItems(), $items);
62 $l =
$f->unordered(array(
"1",
"2"));
64 $items = array(
"1",
"2");
65 $this->assertEquals($l->getItems(), $items);
71 $l =
$f->descriptive(array(
"k1" =>
"c1",
"k2" =>
"c2"));
73 $items = array(
"k1" =>
"c1",
"k2" =>
"c2");
74 $this->assertEquals($l->getItems(), $items);
80 $l =
$f->ordered(array())->withItems(array(
"1",
"2"));
82 $items = array(
"1",
"2");
83 $this->assertEquals($l->getItems(), $items);
89 $l =
$f->unordered(array())->withItems(array(
"1",
"2"));
91 $items = array(
"1",
"2");
92 $this->assertEquals($l->getItems(), $items);
98 $l =
$f->descriptive(array())->withItems(array(
"k1" =>
"c1",
"k2" =>
"c2"));
100 $items = array(
"k1" =>
"c1",
"k2" =>
"c2");
101 $this->assertEquals($l->getItems(), $items);
109 $l =
$f->ordered(array(
"1",
"2"));
118 $this->assertEquals($expected, $html);
126 $f->descriptive(array(
"1"));
128 $this->assertEquals(get_class($e),
"InvalidArgumentException");
137 $f->descriptive(array(
"1",
"1"));
139 $this->assertEquals(get_class($e),
"InvalidArgumentException");
148 $l =
$f->unordered(array(
"1",
"2"));
157 $this->assertEquals($expected, $html);
164 $l =
$f->descriptive(array(
"k1" =>
"c1",
"k2" =>
"c2"));
175 $this->assertEquals($expected, $html);
test_descriptive_invalid_items2()
test_ordered_with_items()
test_unordered_get_items()
getDefaultRenderer(JavaScriptBinding $js_binding=null)
test_implements_factory_interface()
test_descriptive_invalid_items3()
test_descriptive_with_items()
Provides common functionality for UI tests.
test_render_ordered_listing()
Test on button implementation.
test_unordered_with_items()
test_render_descriptive_listing()
test_descriptive_get_items()
test_render_unordered_listing()