diff --git a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldEmailTest.php b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldEmailTest.php index 67d6493bbee23..36d13ba2b9166 100644 --- a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldEmailTest.php +++ b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldEmailTest.php @@ -86,10 +86,22 @@ public function testGetInput($data, $expected) { $formField = new JFormFieldEmail; + $xml = ' $value) { - TestReflection::setValue($formField, $attr, $value); + if ($attr == 'value') + { + $curvalue = $value; + } + else + { + $xml .= $attr . '="' . $value . '" '; + } } + $xml .= '/>'; + + $formField->setup(simplexml_load_string($xml), $curvalue); $this->assertEquals( $expected, diff --git a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldUrlTest.php b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldUrlTest.php index ca14fd5b7c474..1f0b5395e9b3c 100644 --- a/tests/unit/suites/libraries/joomla/form/fields/JFormFieldUrlTest.php +++ b/tests/unit/suites/libraries/joomla/form/fields/JFormFieldUrlTest.php @@ -95,10 +95,22 @@ public function testGetInput($data, $expected) { $formField = new JFormFieldUrl; + $xml = ' $value) { - TestReflection::setValue($formField, $attr, $value); + if ($attr == 'value') + { + $curvalue = $value; + } + else + { + $xml .= $attr . '="' . $value . '" '; + } } + $xml .= '/>'; + + $formField->setup(simplexml_load_string($xml), $curvalue); $this->assertEquals( $expected,