cvs: pear /DB/tests prepexe.inc
| From: | Daniel Convissor | Date: | Wed, 21 Jan 2004 21:34:23 +0000 |
| Subject: | cvs: pear /DB/tests prepexe.inc | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-15853@lists.php.net to get a copy of this message | ||
danielc Wed Jan 21 16:34:23 2004 EDT
Modified files:
/pear/DB/tests prepexe.inc
Log:
Add wording to test output explaining what's going on.
http://cvs.php.net/diff.php/pear/DB/tests/prepexe.inc?r1=1.13&r2=1.14&ty=u
Index: pear/DB/tests/prepexe.inc
diff -u pear/DB/tests/prepexe.inc:1.13 pear/DB/tests/prepexe.inc:1.14
--- pear/DB/tests/prepexe.inc:1.13 Sat Jan 17 13:40:47 2004
+++ pear/DB/tests/prepexe.inc Wed Jan 21 16:34:23 2004
@@ -15,20 +15,25 @@
$sth3 = $dbh->prepare("INSERT INTO phptest (a,b,c) VALUES (?,!,&)");
$sth4 = $dbh->prepare("INSERT INTO phptest (a, b) VALUES (72, 'direct')");
print "sth1,sth2,sth3,sth4 created\n";
+print 'sth1: ? as param, passing as array... ';
if (($res = $dbh->execute($sth1, array(72))) == DB_OK) {
print "sth1 executed\n";
}
+print 'sth2: ! and ? as params, passing as array... ';
if (($res = $dbh->execute($sth2, array(72, "that's right"))) == DB_OK) {
print "sth2 executed\n";
}
+print 'sth3: ?, ! and & as params, passing as array... ';
if (($res = $dbh->execute($sth3, array(72, "'it''s good'",
$tmpfile))) == DB_OK) {
print "sth3 executed\n";
}
+print 'sth4: no params... ';
if (($res = $dbh->execute($sth4)) == DB_OK) {
print "sth4 executed\n";
}
print_results();
+
// 2) One prepared, multiple time executed
echo "\n------------2------------\n";
@@ -42,6 +47,7 @@
$dbh->executeMultiple($sth, $data);
print_results();
+
// 3) freePrepared() test
echo "\n------------3------------\n";
@@ -58,6 +64,7 @@
}
echo "\n";
+
// 4) SELECTs tests
echo "\n------------4------------\n";