2
/* $Id: core.lib.php 9913 2007-02-03 17:30:07Z lem9 $ */
3
// vim: expandtab sw=4 ts=4 sts=4:
6
* Core testing library to wrap phpMyAdmin and add some useful functions.
8
* @author Michal Čihař <michal@cihar.com>
9
* @package phpMyAdmin-test
13
* Go to root directory.
21
* @param string function to test
22
* @param string test description
23
* @param string failure description
25
function PMA_test_fail($function, $test, $message) {
26
$function = htmlspecialchars($function);
27
$test = htmlspecialchars($test);
28
$message = htmlspecialchars($message);
30
<dt>$function ($test)</dt>
31
<dd><strong>Failed:</strong> $message</dd>
38
* @param string function to test
39
* @param string test description
41
function PMA_test_okay($function, $test) {
42
$function = htmlspecialchars($function);
43
$test = htmlspecialchars($test);
45
<dt>$function ($test)</dt>
46
<dd><strong>OK</strong></dd>
51
* Function for testing strings.
53
* @uses PMA_test_okay()
54
* @uses PMA_test_fail()
55
* @param string function to test
56
* @param string test description
57
* @param string actual result
58
* @param string expected result
60
function PMA_test_string($function, $test, $received, $expected) {
61
if ($received != $expected) {
62
PMA_test_fail($function, $test, "Strings >$received< and >$expected< do not match");
64
PMA_test_okay($function, $test);