| 1 |
/* $Id: README.txt,v 1.2 2008/02/24 19:40:50 sun Exp $ */
|
| 2 |
|
| 3 |
-- SUMMARY --
|
| 4 |
|
| 5 |
Code Format unit tests
|
| 6 |
|
| 7 |
These files are implementations for the SimpleTest Drupal module. There
|
| 8 |
is a bit of custom code here to make things go as smoothly as possible,
|
| 9 |
and a little bit of necessary setup. Here's what you'll need:
|
| 10 |
|
| 11 |
|
| 12 |
-- REQUIREMENTS --
|
| 13 |
|
| 14 |
* SimpleTest module, along with the patch in
|
| 15 |
http://drupal.org/node/211823
|
| 16 |
|
| 17 |
* SimpleTest Framework
|
| 18 |
https://sourceforge.net/project/showfiles.php?group_id=76550
|
| 19 |
|
| 20 |
* Text_Diff package from PEAR
|
| 21 |
http://pear.php.net/package/Text_Diff
|
| 22 |
|
| 23 |
|
| 24 |
-- INSTALLATION --
|
| 25 |
|
| 26 |
* If not already done, install SimpleTest module and SimpleTest framework as
|
| 27 |
usual.
|
| 28 |
|
| 29 |
* Apply above mentioned patch to SimpleTest module. See
|
| 30 |
http://drupal.org/patch/apply for further information.
|
| 31 |
|
| 32 |
FYI: This patch fixes some incompatibilities with our heavy OOP testing
|
| 33 |
framework for coder_format. It should not break other tests.
|
| 34 |
|
| 35 |
* Download the Text_Diff package from PEAR into this directory, i.e.
|
| 36 |
|
| 37 |
scripts/coder_format/tests/
|
| 38 |
|
| 39 |
and extract the archive, and rename the folder from "Text_Diff-0.x.x" to
|
| 40 |
"Text".
|
| 41 |
|
| 42 |
* If not already done, go to admin/build/modules, and enable Coder module.
|
| 43 |
|
| 44 |
|
| 45 |
-- USAGE --
|
| 46 |
|
| 47 |
* Go to admin/build/simpletest, and select Coder Format Tests, and run tests.
|
| 48 |
|
| 49 |
|
| 50 |
-- CUSTOMIZATIONS --
|
| 51 |
|
| 52 |
Currently, only the all.test is implemented, which is used to test
|
| 53 |
the overall output of coder_format_string_all(). Appropriate .phpt test
|
| 54 |
files are located in the sub-directory all/.
|
| 55 |
|
| 56 |
The internal format for coder_format tests is:
|
| 57 |
|
| 58 |
TEST: Name of test
|
| 59 |
|
| 60 |
--INPUT--
|
| 61 |
// PHP code to input
|
| 62 |
|
| 63 |
--EXPECT--
|
| 64 |
// Coder cleaned code expected
|
| 65 |
|
| 66 |
Note that <?php and CVS Id tags are not necessary. If you would like to test for
|
| 67 |
those, additionally specify in the file head:
|
| 68 |
|
| 69 |
FULL: 1
|
| 70 |
|
| 71 |
For temporary development work, you can add --ONLY-- to the end of a test
|
| 72 |
case to make it the test runner only run that one. This is useful for test
|
| 73 |
files that contain multiple tests.
|
| 74 |
|
| 75 |
-- CONTACT --
|
| 76 |
|
| 77 |
Current maintainers:
|
| 78 |
* Edward Z. Yang (ezyang)
|
| 79 |
* Daniel F. Kudwien (sun) - dev@unleashedmind.com
|
| 80 |
|