diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 7dd7b3e996..e2028bbee6 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3575,7 +3575,8 @@ public function _uc_select_cb($treename, $classnum, $current_value, $nest_level) */ public function optgroup_open($label, $disabled = false, $options = null) { - return "\n"; + $unique = 'optgroup-'.$this->name2id($label); + return "\n"; } /** diff --git a/e107_tests/tests/unit/e_formTest.php b/e107_tests/tests/unit/e_formTest.php index c85b09aa92..5f6482ac1c 100644 --- a/e107_tests/tests/unit/e_formTest.php +++ b/e107_tests/tests/unit/e_formTest.php @@ -203,7 +203,7 @@ protected function _before() } catch (Exception $e) { - $this->assertTrue(false, "Couldn't load e_form object"); + self::fail("Couldn't load e_form object"); } @@ -230,7 +230,7 @@ protected function _before() if(!file_exists($legacyFile)) { - $this->assertTrue(false,"Couldn't copy legacy image 'butterfly.jpg' to e107_files folder"); + self::fail("Couldn't copy legacy image 'butterfly.jpg' to e107_files folder"); } } @@ -273,12 +273,12 @@ public function testGetCountry() foreach($tests as $t) { $actual = $this->_frm->getCountry($t['value']); - $this->assertEquals($t['expected'], $actual); + self::assertEquals($t['expected'], $actual); } // return array. $actual = $this->_frm->getCountry(); - $this->assertArrayHasKey('au',$actual); + self::assertArrayHasKey('au',$actual); @@ -317,14 +317,14 @@ public function testTabs() // Test 1 $opt = ['active'=>'1', 'fade'=>true]; $result = $this->_frm->tabs($array,$opt); - $this->assertStringContainsString('assertStringContainsString('
_frm->tabs($array,$opt); - $this->assertStringContainsString('assertStringContainsString('
'slide2']; @@ -334,8 +334,8 @@ public function testTabs() ]; $result = $this->_frm->tabs($array,$opt); - $this->assertStringContainsString('