5 require_once(__DIR__.
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__.
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
19 return new \ILIAS\UI\Implementation\Component\Listing\Factory();
26 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Listing\\Factory", $f);
27 $this->assertInstanceOf
28 (
"ILIAS\\UI\\Component\\Listing\\Ordered" 29 , $f->ordered(
array(
"1"))
31 $this->assertInstanceOf
32 (
"ILIAS\\UI\\Component\\Listing\\Unordered" 33 , $f->unordered(
array(
"1"))
35 $this->assertInstanceOf
36 (
"ILIAS\\UI\\Component\\Listing\\Descriptive" 37 , $f->descriptive(
array(
"k1"=>
"c1"))
44 $l = $f->ordered(
array(
"1",
"2"));
46 $items =
array(
"1",
"2");
47 $this->assertEquals(
$l->getItems(), $items);
52 $l = $f->unordered(
array(
"1",
"2"));
54 $items =
array(
"1",
"2");
55 $this->assertEquals(
$l->getItems(), $items);
60 $l = $f->descriptive(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
62 $items =
array(
"k1"=>
"c1",
"k2"=>
"c2");
63 $this->assertEquals(
$l->getItems(), $items);
70 $items =
array(
"1",
"2");
71 $this->assertEquals(
$l->getItems(), $items);
78 $items =
array(
"1",
"2");
79 $this->assertEquals(
$l->getItems(), $items);
84 $l = $f->descriptive(
array())->withItems(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
86 $items =
array(
"k1"=>
"c1",
"k2"=>
"c2");
87 $this->assertEquals(
$l->getItems(), $items);
94 $l = $f->ordered(
array(
"1",
"2"));
103 $this->assertEquals($expected,
$html);
110 $f->descriptive(
array(
"1"));
112 $this->assertEquals(get_class($e),
"InvalidArgumentException");
120 $f->descriptive(
array(
"1",
"1"));
122 $this->assertEquals(get_class($e),
"InvalidArgumentException");
130 $l = $f->unordered(
array(
"1",
"2"));
139 $this->assertEquals($expected,
$html);
145 $l = $f->descriptive(
array(
"k1"=>
"c1",
"k2"=>
"c2"));
156 $this->assertEquals($expected,
$html);
test_descriptive_invalid_items2()
test_ordered_with_items()
test_unordered_get_items()
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()