Skip to content

Commit

Permalink
let's see
Browse files Browse the repository at this point in the history
  • Loading branch information
demeritcowboy committed Oct 5, 2021
1 parent 3b88340 commit 6b2501a
Showing 1 changed file with 0 additions and 175 deletions.
175 changes: 0 additions & 175 deletions tests/phpunit/CiviTest/CiviUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ protected function setUp(): void {
error_reporting(E_ALL);

$this->renameLabels();
$this->_sethtmlGlobals();
$this->ensureMySQLMode(['IGNORE_SPACE', 'ERROR_FOR_DIVISION_BY_ZERO', 'STRICT_TRANS_TABLES']);
}

Expand Down Expand Up @@ -2248,180 +2247,6 @@ public function financialAccountDelete($name) {
}
}

/**
* FIXME: something NULLs $GLOBALS['_HTML_QuickForm_registered_rules'] when the tests are ran all together
* (NB unclear if this is still required)
*/
public function _sethtmlGlobals() {
$GLOBALS['_HTML_QuickForm_registered_rules'] = [
'required' => [
'html_quickform_rule_required',
'HTML/QuickForm/Rule/Required.php',
],
'maxlength' => [
'html_quickform_rule_range',
'HTML/QuickForm/Rule/Range.php',
],
'minlength' => [
'html_quickform_rule_range',
'HTML/QuickForm/Rule/Range.php',
],
'rangelength' => [
'html_quickform_rule_range',
'HTML/QuickForm/Rule/Range.php',
],
'email' => [
'html_quickform_rule_email',
'HTML/QuickForm/Rule/Email.php',
],
'regex' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'lettersonly' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'alphanumeric' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'numeric' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'nopunctuation' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'nonzero' => [
'html_quickform_rule_regex',
'HTML/QuickForm/Rule/Regex.php',
],
'callback' => [
'html_quickform_rule_callback',
'HTML/QuickForm/Rule/Callback.php',
],
'compare' => [
'html_quickform_rule_compare',
'HTML/QuickForm/Rule/Compare.php',
],
];
// add the maxfilesize rule needed for File form fields
(new CRM_Core_Form())->registerRule('maxfilesize', 'callback', '_ruleCheckMaxFileSize', 'HTML_QuickForm_file');
// FIXME: …ditto for $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES']
$GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'] = [
'group' => [
'HTML/QuickForm/group.php',
'HTML_QuickForm_group',
],
'hidden' => [
'HTML/QuickForm/hidden.php',
'HTML_QuickForm_hidden',
],
'reset' => [
'HTML/QuickForm/reset.php',
'HTML_QuickForm_reset',
],
'checkbox' => [
'HTML/QuickForm/checkbox.php',
'HTML_QuickForm_checkbox',
],
'file' => [
'HTML/QuickForm/file.php',
'HTML_QuickForm_file',
],
'image' => [
'HTML/QuickForm/image.php',
'HTML_QuickForm_image',
],
'password' => [
'HTML/QuickForm/password.php',
'HTML_QuickForm_password',
],
'radio' => [
'HTML/QuickForm/radio.php',
'HTML_QuickForm_radio',
],
'button' => [
'HTML/QuickForm/button.php',
'HTML_QuickForm_button',
],
'submit' => [
'HTML/QuickForm/submit.php',
'HTML_QuickForm_submit',
],
'select' => [
'HTML/QuickForm/select.php',
'HTML_QuickForm_select',
],
'hiddenselect' => [
'HTML/QuickForm/hiddenselect.php',
'HTML_QuickForm_hiddenselect',
],
'text' => [
'HTML/QuickForm/text.php',
'HTML_QuickForm_text',
],
'textarea' => [
'HTML/QuickForm/textarea.php',
'HTML_QuickForm_textarea',
],
'fckeditor' => [
'HTML/QuickForm/fckeditor.php',
'HTML_QuickForm_FCKEditor',
],
'tinymce' => [
'HTML/QuickForm/tinymce.php',
'HTML_QuickForm_TinyMCE',
],
'dojoeditor' => [
'HTML/QuickForm/dojoeditor.php',
'HTML_QuickForm_dojoeditor',
],
'link' => [
'HTML/QuickForm/link.php',
'HTML_QuickForm_link',
],
'advcheckbox' => [
'HTML/QuickForm/advcheckbox.php',
'HTML_QuickForm_advcheckbox',
],
'date' => [
'HTML/QuickForm/date.php',
'HTML_QuickForm_date',
],
'static' => [
'HTML/QuickForm/static.php',
'HTML_QuickForm_static',
],
'header' => [
'HTML/QuickForm/header.php',
'HTML_QuickForm_header',
],
'html' => [
'HTML/QuickForm/html.php',
'HTML_QuickForm_html',
],
'hierselect' => [
'HTML/QuickForm/hierselect.php',
'HTML_QuickForm_hierselect',
],
'autocomplete' => [
'HTML/QuickForm/autocomplete.php',
'HTML_QuickForm_autocomplete',
],
'xbutton' => [
'HTML/QuickForm/xbutton.php',
'HTML_QuickForm_xbutton',
],
'advmultiselect' => [
'HTML/QuickForm/advmultiselect.php',
'HTML_QuickForm_advmultiselect',
],
];
}

/**
* Set up an acl allowing contact to see 2 specified groups
* - $this->_permissionedGroup & $this->_permissionedDisabledGroup
Expand Down

0 comments on commit 6b2501a

Please sign in to comment.