README.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_module.js'. If you have SimpleTest's verbose
  16. mode enabled and see the above text in one of the debug pages, the noted
  17. JavaScript 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_module: 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_module.js, libraries_test_module.css,
  37. libraries_test_module.inc and are located in the test module's directory
  38. alongside libraries_test_module.info (i.e. they are not in the same directory as
  39. this file).