projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
534e937
)
CRM-17860 - CiviUnitTestCase::_populateDB() - Guard against accidental destruction
author
Tim Otten
<totten@civicrm.org>
Fri, 22 Jan 2016 11:26:39 +0000
(
03:26
-0800)
committer
Tim Otten
<totten@civicrm.org>
Tue, 2 Feb 2016 04:56:23 +0000
(21:56 -0700)
tests/phpunit/CiviTest/CiviUnitTestCase.php
patch
|
blob
|
blame
|
history
diff --git
a/tests/phpunit/CiviTest/CiviUnitTestCase.php
b/tests/phpunit/CiviTest/CiviUnitTestCase.php
index c952af0dfb4cbb4949a1a9d464170834720b3a2d..ee73850bb338c07b693be7eff2c919984e2cd150 100755
(executable)
--- a/
tests/phpunit/CiviTest/CiviUnitTestCase.php
+++ b/
tests/phpunit/CiviTest/CiviUnitTestCase.php
@@
-249,6
+249,9
@@
class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
* TRUE if the populate logic runs; FALSE if it is skipped
*/
protected static function _populateDB($perClass = FALSE, &$object = NULL) {
+ if (CIVICRM_UF !== 'UnitTests') {
+ throw new \RuntimeException("_populateDB requirs CIVICRM_UF=UnitTests");
+ }
if ($perClass || $object == NULL) {
$dbreset = TRUE;