[ticket/715] Make expected error type depend on PHP version

B3P-715
This commit is contained in:
Marc Alexander
2021-09-04 11:27:09 +02:00
parent ed54e3ef0c
commit 6306d6a18b

View File

@@ -207,7 +207,7 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
$this->welcome = new \board3\portal\modules\welcome($this->config, $this->request, $this->template, $this->user, '', '');
$this->request->overwrite('submit', true, \phpbb\request\request_interface::POST);
$this->request->overwrite('welcome_message', '');
$this->setExpectedTriggerError(E_WARNING);
$this->setExpectedTriggerError(version_compare(PHP_VERSION, '8', '>=') ? E_WARNING : E_USER_WARNING);
check_form_key::$form_key_valid = true;
$this->welcome->update_welcome('foobar', 5);
}