diff options
author | philsturgeon <devnull@localhost> | 2011-06-15 17:00:03 +0200 |
---|---|---|
committer | philsturgeon <devnull@localhost> | 2011-06-15 17:00:03 +0200 |
commit | 0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch) | |
tree | ce168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /user_guide/libraries/unit_testing.html | |
parent | 3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff) | |
parent | 3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff) |
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'user_guide/libraries/unit_testing.html')
-rw-r--r-- | user_guide/libraries/unit_testing.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html index 49c5881e1..a4305129f 100644 --- a/user_guide/libraries/unit_testing.html +++ b/user_guide/libraries/unit_testing.html @@ -28,7 +28,7 @@ <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> -<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td> +<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td> <td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td> </tr> </table> @@ -92,7 +92,7 @@ $test_name = 'Adds one plus one';<br /> <br /> $this->unit->run($test, $expected_result, $test_name);</code> -<p>The expected result you supply can either be a literal match, or a data type match. Here's an example of a literal:</p> +<p>The expected result you supply can either be a literal match, or a data type match. Here's an example of a literal:</p> <code>$this->unit->run('Foo', 'Foo');</code> @@ -100,8 +100,8 @@ $this->unit->run($test, $expected_result, $test_name);</code> <code>$this->unit->run('Foo', 'is_string');</code> -<p>Notice the use of "is_string" in the second parameter? This tells the function to evaluate whether your test is producing a string -as the result. Here is a list of allowed comparison types:</p> +<p>Notice the use of "is_string" in the second parameter? This tells the function to evaluate whether your test is producing a string +as the result. Here is a list of allowed comparison types:</p> <ul> <li>is_object</li> @@ -129,18 +129,18 @@ To show a report directly simply echo or return the <var>run</var> function:</p> <code>echo $this->unit->report();</code> -<p>The report will be formatted in an HTML table for viewing. If you prefer the raw data you can retrieve an array using:</p> +<p>The report will be formatted in an HTML table for viewing. If you prefer the raw data you can retrieve an array using:</p> <code>echo $this->unit->result();</code> <h2>Strict Mode</h2> -<p>By default the unit test class evaluates literal matches loosely. Consider this example:</p> +<p>By default the unit test class evaluates literal matches loosely. Consider this example:</p> <code>$this->unit->run(1, TRUE);</code> -<p>The test is evaluating an integer, but the expected result is a boolean. PHP, however, due to it's loose data-typing +<p>The test is evaluating an integer, but the expected result is a boolean. PHP, however, due to it's loose data-typing will evaluate the above code as TRUE using a normal equality test:</p> <code>if (1 == TRUE) echo 'This evaluates as true';</code> @@ -184,8 +184,8 @@ You can customize which of these items get displayed by using <kbd>$this->unit-> <h3>Creating a Template</h3> -<p>If you would like your test results formatted differently then the default you can set your own template. Here is an -example of a simple template. Note the required pseudo-variables:</p> +<p>If you would like your test results formatted differently then the default you can set your own template. Here is an +example of a simple template. Note the required pseudo-variables:</p> <code> $str = '<br /> |