]> granicus.if.org Git - php/commitdiff
added testcase for mysqli_warning class
authorGeorg Richter <georg@php.net>
Wed, 22 Jun 2005 10:15:37 +0000 (10:15 +0000)
committerGeorg Richter <georg@php.net>
Wed, 22 Jun 2005 10:15:37 +0000 (10:15 +0000)
ext/mysqli/tests/066.phpt [new file with mode: 0644]

diff --git a/ext/mysqli/tests/066.phpt b/ext/mysqli/tests/066.phpt
new file mode 100644 (file)
index 0000000..01434f8
--- /dev/null
@@ -0,0 +1,28 @@
+--TEST--
+function test: mysqli_warning object
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+
+       include "connect.inc";
+       
+       /*** test mysqli_connect 127.0.0.1 ***/
+       $mysql = new mysqli($host, $user, $passwd, "test");
+
+       $mysql->query("DROP TABLE IF EXISTS test_warnings");
+
+       $mysql->query("CREATE TABLE test_warnings (a int not null)");
+
+       $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)");
+       
+       if (($warning = new mysqli_warning($mysql))) {
+               do {
+                       printf("Warning\n");
+               } while ($warning->next());
+       }
+
+       $mysql->close();
+?>
+--EXPECT--
+Warning