Skip to content

Commit

Permalink
Fix failing test of Config\FormDisplayTemplateTest
Browse files Browse the repository at this point in the history
Related to 2a4729c

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed May 1, 2019
1 parent 89d588a commit 6b44326
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion libraries/classes/Config/Validator.php
Expand Up @@ -156,7 +156,7 @@ public static function validate(
$new_result = array();
foreach ($result as $k => $v) {
$k2 = isset($key_map[$k]) ? $key_map[$k] : $k;
$new_result[$k2] = $v;
$new_result[$k2] = htmlspecialchars($v);
}
return empty($new_result) ? true : $new_result;
}
Expand Down
16 changes: 0 additions & 16 deletions test/classes/Config/FormDisplayTemplateTest.php
Expand Up @@ -532,20 +532,4 @@ public function testDisplayJavascript()
$result
);
}

/**
* Test for FormDisplayTemplate::displayErrors()
*
* @return void
*/
public function testDisplayErrors()
{
$errors = array('<err1>', '&err2');

$result = FormDisplayTemplate::displayErrors('err"Name1"', $errors);

$this->assertContains('<dt>err&quot;Name1&quot;</dt>', $result);
$this->assertContains('<dd>&lt;err1&gt;</dd>', $result);
$this->assertContains('<dd>&amp;err2</dd>', $result);
}
}

0 comments on commit 6b44326

Please sign in to comment.