From 0d56725dd699041530e92026868193e87b81b837 Mon Sep 17 00:00:00 2001 From: knut <> Date: Mon, 6 Feb 2006 20:01:41 +0000 Subject: added some more tests --- .../unit/Web/UI/WebControls/TDropDownListTest.php | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/unit/Web/UI/WebControls/TDropDownListTest.php (limited to 'tests/unit/Web/UI/WebControls/TDropDownListTest.php') diff --git a/tests/unit/Web/UI/WebControls/TDropDownListTest.php b/tests/unit/Web/UI/WebControls/TDropDownListTest.php new file mode 100644 index 00000000..b93d32cf --- /dev/null +++ b/tests/unit/Web/UI/WebControls/TDropDownListTest.php @@ -0,0 +1,30 @@ + 1, + 'b' => 2, + 'c' => 3); + $list->setDataSource($data); + $list->dataBind(); + $items =& $list->getItems(); + $this->assertTrue($items instanceof TListItemCollection); + $expected_keys = array_keys($data); + $i = 0; + foreach($items as $item) { + $this->assertEquals($expected_keys[$i], $item->getValue()); + $this->assertEquals((string)$data[$expected_keys[$i]], $item->getText()); + $i++; + } + } +} + +?> \ No newline at end of file -- cgit v1.2.3