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