diff --git a/tests/unit/e_formTest.php b/tests/unit/e_formTest.php index f58c91041..edd502831 100644 --- a/tests/unit/e_formTest.php +++ b/tests/unit/e_formTest.php @@ -92,10 +92,11 @@ try { $this->_frm = $this->make('e_form'); + $this->_frm->__construct(); } catch (Exception $e) { - $this->assertTrue(false, "Couldn't load e_parser object"); + $this->assertTrue(false, "Couldn't load e_form object"); } } @@ -402,22 +403,73 @@ { } - - public function testUc_select() - { - - } - - public function test_uc_select_cb() - { - - } - - public function testOptgroup_open() - { - - } */ + public function testUc_select_single_numeric() + { + $uc_options = 'admin'; + $select_options = array('multiple' => false); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 254, $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_single_string() + { + $uc_options = 'admin'; + $select_options = array('multiple' => false); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_numeric() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', '254,253', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_string() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin,Members', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + public function testUc_select_multi_mixed() + { + $uc_options = 'member,admin'; + $select_options = array('multiple' => true); + $opt_options = array(); + $actual = $this->_frm->uc_select('uc', 'Admin,253', $uc_options, $select_options, $opt_options); + $expected = ""; + + $this->assertEquals($expected, $actual); + } + + /* + public function test_uc_select_cb() + { + + } + + public function testOptgroup_open() + { + + } + */ public function testOption() { $options = array('disabled'=>true);