Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.6
-
Fix Version/s: 4.2.7
-
Component/s: Core CiviCRM
-
Labels:None
Description
This is a patch against the SVN version of CiviCRM to simplify unit testing configuration.
The first patch, unittestlocal.diff, removes <civicrm>/tests/phpunit/CiviTest/civicrm.settings.php.txt, and replaces it with two files:
- civicrm.settings.dist.php
- civicrm.settings.local.php.txt
civicrm.settings.dist.php contains the defaults previously contained in civicrm.settings.php, and should work without modification. If you set your DSN connection parameters via arguments to phpunit, or via a .my.cnf file, then unit testing will now work without further configuration.
civicrm.settings.local.php.txt is intended to be copied to civicrm.settings.local.php, and can contain overrides to constants set in civicrm.settings.dist.php (for instance, to set an alternate DSN for phpunit).
This patch also removes /tests/bin/run.php and /tests/bin/api3.php - per Eileen, these files no longer work.
The second patch, removepasswordprompt.diff, removes the password prompt from phpunit which previously allowed you to run phpunit without defining a DSN, and would prompt you for a password when run. Without removing this, we'd be prompted for a password when setting DSN info in the local settings file. After conversing with Tim and Lobo, we decided it was best to remove this code.