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"))
48 $l = $f->ordered(
array(
"1",
"2"));
50 $items =
array(
"1",
"2");
51 $this->assertEquals(
$l->getItems(), $items);
57 $l = $f->unordered(
array(
"1",
"2"));
59 $items =
array(
"1",
"2");
60 $this->assertEquals(
$l->getItems(), $items);
66 $l = $f->descriptive(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
68 $items =
array(
"k1"=>
"c1",
"k2"=>
"c2");
69 $this->assertEquals(
$l->getItems(), $items);
77 $items =
array(
"1",
"2");
78 $this->assertEquals(
$l->getItems(), $items);
86 $items =
array(
"1",
"2");
87 $this->assertEquals(
$l->getItems(), $items);
93 $l = $f->descriptive(
array())->withItems(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
95 $items =
array(
"k1"=>
"c1",
"k2"=>
"c2");
96 $this->assertEquals(
$l->getItems(), $items);
104 $l = $f->ordered(
array(
"1",
"2"));
113 $this->assertEquals($expected,
$html);
121 $f->descriptive(
array(
"1"));
123 $this->assertEquals(get_class($e),
"InvalidArgumentException");
132 $f->descriptive(
array(
"1",
"1"));
134 $this->assertEquals(get_class($e),
"InvalidArgumentException");
143 $l = $f->unordered(
array(
"1",
"2"));
152 $this->assertEquals($expected,
$html);
159 $l = $f->descriptive(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
170 $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.
Create styles array
The data for the language used.
test_unordered_with_items()
test_render_descriptive_listing()
test_descriptive_get_items()
test_render_unordered_listing()