You are here

README.txt in Coder 7.2

-- SUMMARY --

Code Format unit tests

These files are implementations for the SimpleTest Drupal module. There
is a bit of custom code here to make things go as smoothly as possible,
and a little bit of necessary setup. Here's what you'll need:


-- REQUIREMENTS --

* SimpleTest module, along with the patch in
  http://drupal.org/node/211823

* SimpleTest Framework
  https://sourceforge.net/project/showfiles.php?group_id=76550

* Text_Diff package from PEAR
  http://pear.php.net/package/Text_Diff


-- INSTALLATION --

* If not already done, install SimpleTest module and SimpleTest framework as
  usual.

* Apply above mentioned patch to SimpleTest module. See
  http://drupal.org/patch/apply for further information.

  FYI: This patch fixes some incompatibilities with our heavy OOP testing
  framework for coder_format. It should not break other tests.

* Download the Text_Diff package from PEAR into this directory, i.e.

  scripts/coder_format/tests/

  and extract the archive, and rename the folder from "Text_Diff-0.x.x" to
  "Text".

* If not already done, go to admin/build/modules, and enable Coder module.


-- USAGE --

* Go to admin/build/simpletest, and select Coder Format Tests, and run tests.


-- CUSTOMIZATIONS --

Currently, only the all.test is implemented, which is used to test
the overall output of coder_format_string_all(). Appropriate .phpt test
files are located in the sub-directory all/.

The internal format for coder_format tests is:

  TEST: Name of test

  --INPUT--
  // PHP code to input

  --EXPECT--
  // Coder cleaned code expected

Note that <?php and CVS Id tags are not necessary. If you would like to test for
those, additionally specify in the file head:

  FULL: 1

For temporary development work, you can add --ONLY-- to the end of a test
case to make it the test runner only run that one. This is useful for test
files that contain multiple tests.

-- CONTACT --

Current maintainers:
* Edward Z. Yang (ezyang)
* Daniel F. Kudwien (sun) - dev@unleashedmind.com

File

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