CRM-12622 - CiviUnitTestCase - Promote sethtmlGlobals
authorTim Otten <totten@civicrm.org>
Tue, 30 Jul 2013 04:19:53 +0000 (21:19 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 30 Jul 2013 04:19:53 +0000 (21:19 -0700)
commit5c2e58ae6de9a0f13cb65d0f4bd6fa8cca12aeb7
tree847d1b84a3b4c5684abea4fd3183bfa909e16160
parent25c8f5c66c277bcb918c9d9fca8910189e38fb8d
CRM-12622 - CiviUnitTestCase - Promote sethtmlGlobals

When defining multiple cases in CRM_Report_Form_Contribute_Detail, the
second case fails due to an uninitialized (lost?) global.
api_v3_UFFieldTest seems to have a work-around.

```
1) CRM_Report_Form_Contribute_DetailTest::testReportOutput with data set #1 ('CRM_Report_Form_Contribute_Detail', array(array('first_name', 'email', 'total_amount'), array('gte', 50)), 'fixtures/dataset.sql', 'fixtures/report.csv')
Undefined index: _HTML_QuickForm_registered_rules

/Applications/MAMP/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/RuleRegistry.php:122
/Applications/MAMP/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/RuleRegistry.php:98
/Applications/MAMP/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm.php:389
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php:187
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php:156
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Report/Form.php:256
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Report/Form/Contribute/Detail.php:362
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Core/Controller.php:426
/Applications/MAMP/htdocs/sites/all/modules/civicrm/CRM/Core/Controller/Simple.php:79
/Applications/MAMP/htdocs/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviReportTestCase.php:43
/Applications/MAMP/htdocs/sites/all/modules/civicrm/tests/phpunit/CRM/Report/Form/Contribute/DetailTest.php:105
/Applications/MAMP/htdocs/sites/all/modules/civicrm/tools/scripts/phpunit:75
```

----------------------------------------
* CRM-12622: Create framework for example report data files
  http://issues.civicrm.org/jira/browse/CRM-12622
tests/phpunit/CiviTest/CiviReportTestCase.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/UFFieldTest.php