diff --git a/extension/qfq/tests/phpunit/BuildFormPlainTest.php b/extension/qfq/tests/phpunit/BuildFormPlainTest.php index 7d3e91d97125896b98a6271c27a93d9f45e68fe3..872113cdfc2414d0992b172769e3de07984cb45c 100644 --- a/extension/qfq/tests/phpunit/BuildFormPlainTest.php +++ b/extension/qfq/tests/phpunit/BuildFormPlainTest.php @@ -122,7 +122,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest { $formElement['checkType'] = SANITIZE_ALLOW_EMAIL; $formElement['checkPattern'] = ''; $result = $build->buildInput($formElement, 'name:1', '', $json); - $this->assertEquals('<input name="name:1" type="input" maxlength="255" value="" pattern="^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$" >', $result); + $this->assertEquals('<input name="name:1" type="input" maxlength="255" value="" pattern="^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$" >', $result); $this->assertEquals(['form-element' => 'name:1', 'value' => '', 'disabled' => false, 'readonly' => false], $json); $formElement['checkType'] = ''; diff --git a/extension/qfq/tests/phpunit/SanitizeTest.php b/extension/qfq/tests/phpunit/SanitizeTest.php index 154dc334e3487012eba19c5b15dc7bbda238b017..84fc555dbe77c4d0a4c7d059c86fc841aa33e2e5 100644 --- a/extension/qfq/tests/phpunit/SanitizeTest.php +++ b/extension/qfq/tests/phpunit/SanitizeTest.php @@ -149,7 +149,7 @@ class SanitizeTest extends \PHPUnit_Framework_TestCase { $this->assertEquals('', Sanitize::sanitize($val, SANITIZE_ALLOW_EMAIL), "SANITIZE_ALLOW_EMAIL fails"); $val = 'jo%hn@doe.com'; - $this->assertEquals('', Sanitize::sanitize($val, SANITIZE_ALLOW_EMAIL), "SANITIZE_ALLOW_EMAIL fails"); + $this->assertEquals('jo%hn@doe.com', Sanitize::sanitize($val, SANITIZE_ALLOW_EMAIL), "SANITIZE_ALLOW_EMAIL fails"); } public function testSanitizePattern() {