README.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Example library
  2. Version 1
  3. This file is an example file to test version detection.
  4. The various other files in this directory are to test the loading of JavaScript,
  5. CSS and PHP files.
  6. - JavaScript: The filenames of the JavaScript files are asserted to be in the
  7. raw HTML via SimpleTest. Since the filename could appear, for instance, in an
  8. error message, this is not very robust. Explicit testing of JavaScript,
  9. though, is not yet possible with SimpleTest. To allow for easier debugging, we
  10. place the following text on the page:
  11. "If this text shows up, no JavaScript test file was loaded."
  12. This text is replaced via JavaScript by a text of the form:
  13. "If this text shows up, [[file] was loaded successfully."
  14. [file] is either 'example_1.js', 'example_2.js', 'example_3.js',
  15. 'example_4.js' or 'libraries_test.js'. If you have SimpleTest's verbose mode
  16. enabled and see the above text in one of the debug pages, the noted JavaScript
  17. file was loaded successfully.
  18. - CSS: The filenames of the CSS files are asserted to be in the raw HTML via
  19. SimpleTest. Since the filename could appear, for instance, in an error
  20. message, this is not very robust. Explicit testing of CSS, though, is not yet
  21. possible with SimpleTest. Hence, the CSS files, if loaded, make the following
  22. text a certain color:
  23. "If one of the CSS test files has been loaded, this text will be colored:
  24. - example_1: red
  25. - example_2: green
  26. - example_3: orange
  27. - example_4: blue
  28. - libraries_test: purple"
  29. If you have SimpleTest's verbose mode enabled, and see the above text in a
  30. certain color (i.e. not in black), a CSS file was loaded successfully. Which
  31. file depends on the color as referenced in the text above.
  32. - PHP: The loading of PHP files is tested by defining a dummy function in the
  33. PHP files and then checking whether this function was defined using
  34. function_exists(). This can be checked programatically with SimpleTest.
  35. The loading of integration files is tested with the same method. The integration
  36. files are libraries_test.js, libraries_test.css, libraries_test.inc and are
  37. located in the tests directory alongside libraries_test.module (i.e. they are
  38. not in the same directory as this file).