Commit df61162e authored by Carsten  Rose's avatar Carsten Rose
Browse files

fix unit tests

parent 3792b029
Pipeline #2669 failed with stages
in 1 minute and 56 seconds
...@@ -19,6 +19,11 @@ use PHPUnit\Framework\TestCase; ...@@ -19,6 +19,11 @@ use PHPUnit\Framework\TestCase;
*/ */
class HelperFormElementTest extends TestCase { class HelperFormElementTest extends TestCase {
/**
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function testExplodeParameter() { public function testExplodeParameter() {
$a = array(); $a = array();
...@@ -33,6 +38,11 @@ class HelperFormElementTest extends TestCase { ...@@ -33,6 +38,11 @@ class HelperFormElementTest extends TestCase {
$this->assertEquals($b, $a, "Both arrays should be equal"); $this->assertEquals($b, $a, "Both arrays should be equal");
} }
/**
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
public function testExplodeParameterInArrayElements() { public function testExplodeParameterInArrayElements() {
$a = array(); $a = array();
HelperFormElement::explodeParameterInArrayElements($a, FE_PARAMETER); HelperFormElement::explodeParameterInArrayElements($a, FE_PARAMETER);
...@@ -48,8 +58,9 @@ class HelperFormElementTest extends TestCase { ...@@ -48,8 +58,9 @@ class HelperFormElementTest extends TestCase {
/** /**
* @expectedException \UserFormException * @throws \CodeException
* * @throws \UserFormException
* @throws \UserReportException
*/ */
public function testExplodeFieldParameterException() { public function testExplodeFieldParameterException() {
...@@ -187,6 +198,9 @@ class HelperFormElementTest extends TestCase { ...@@ -187,6 +198,9 @@ class HelperFormElementTest extends TestCase {
} }
/**
* @throws \UserFormException
*/
public function testPenColorToHex() { public function testPenColorToHex() {
$result = HelperFormElement::penColorToHex([FE_DEFAULT_PEN_COLOR => '']); $result = HelperFormElement::penColorToHex([FE_DEFAULT_PEN_COLOR => '']);
$this->assertEquals('', $result, "Expect empty string"); $this->assertEquals('', $result, "Expect empty string");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment