uw              Thu Jul 12 20:55:12 2007 UTC

  Modified files:              
    /php-src/ext/mysqli/tests   040.phpt 041.phpt 042.phpt 043.phpt 
                                044.phpt 045.phpt 046.phpt 047.phpt 
                                048.phpt 049.phpt 
  Log:
  As usual:
  
   - connection parameter tweaking
   - a bit of whitespace here and there
   - use UEXPECTF if need be
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/040.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/mysqli/tests/040.phpt
diff -u php-src/ext/mysqli/tests/040.phpt:1.3 
php-src/ext/mysqli/tests/040.phpt:1.4
--- php-src/ext/mysqli/tests/040.phpt:1.3       Sat Dec  4 08:50:33 2004
+++ php-src/ext/mysqli/tests/040.phpt   Thu Jul 12 20:55:12 2007
@@ -6,11 +6,11 @@
 <?php
 
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
 
        mysqli_query($link, "DROP TABLE IF EXISTS test_result");
 
@@ -28,6 +28,8 @@
        var_dump($num);
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECT--
 int(1)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/041.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqli/tests/041.phpt
diff -u php-src/ext/mysqli/tests/041.phpt:1.5 
php-src/ext/mysqli/tests/041.phpt:1.6
--- php-src/ext/mysqli/tests/041.phpt:1.5       Fri Jul  8 08:53:25 2005
+++ php-src/ext/mysqli/tests/041.phpt   Thu Jul 12 20:55:12 2007
@@ -6,10 +6,10 @@
 <?php
 
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
-       mysqli_select_db($link, "test");
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+       mysqli_select_db($link, $db);
 
        mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
        mysqli_query($link, "DROP TABLE IF EXISTS test_warnings");
@@ -17,6 +17,8 @@
        var_dump(mysqli_warning_count($link));
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECT--
 int(1)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/042.phpt?r1=1.9&r2=1.10&diff_format=u
Index: php-src/ext/mysqli/tests/042.phpt
diff -u php-src/ext/mysqli/tests/042.phpt:1.9 
php-src/ext/mysqli/tests/042.phpt:1.10
--- php-src/ext/mysqli/tests/042.phpt:1.9       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/042.phpt   Thu Jul 12 20:55:12 2007
@@ -5,15 +5,15 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
        mysqli_query($link, "SET sql_mode=''");
 
-       mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
-       mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
+       mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
+       mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
                                                      c2 smallint unsigned,
                                                      c3 smallint,
                                                      c4 smallint,
@@ -42,6 +42,7 @@
        var_dump($test);
 
        mysqli_close($link);
+       print "done!"
 ?>
 --EXPECTF--
 object(stdClass)#%d (7) {
@@ -60,6 +61,7 @@
   ["c7"]=>
   string(1) "0"
 }
+done!
 --UEXPECTF--
 object(stdClass)#%d (7) {
   [u"c1"]=>
@@ -77,3 +79,4 @@
   [u"c7"]=>
   unicode(1) "0"
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/043.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/mysqli/tests/043.phpt
diff -u php-src/ext/mysqli/tests/043.phpt:1.6 
php-src/ext/mysqli/tests/043.phpt:1.7
--- php-src/ext/mysqli/tests/043.phpt:1.6       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/043.phpt   Thu Jul 12 20:55:12 2007
@@ -5,14 +5,14 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
 
-       mysqli_query($link,"DROP TABLE IF EXISTS test_update");
-       mysqli_query($link,"CREATE TABLE test_update(a varchar(10),
+       mysqli_query($link,"DROP TABLE IF EXISTS test_update");
+       mysqli_query($link,"CREATE TABLE test_update(a varchar(10),
                                                      b int)");
 
        mysqli_query($link, "INSERT INTO test_update VALUES ('foo', 2)");
@@ -34,9 +34,17 @@
        var_dump($test);
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECTF--
 array(1) {
   [0]=>
-  %s(15) "Rasmus is No. 1"
+  string(15) "Rasmus is No. 1"
+}
+done!
+--UEXPECF--
+array(1) {
+  [0]=>
+  unicode(15) "Rasmus is No. 1"
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/044.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/mysqli/tests/044.phpt
diff -u php-src/ext/mysqli/tests/044.phpt:1.3 
php-src/ext/mysqli/tests/044.phpt:1.4
--- php-src/ext/mysqli/tests/044.phpt:1.3       Sat Dec  4 08:50:33 2004
+++ php-src/ext/mysqli/tests/044.phpt   Thu Jul 12 20:55:12 2007
@@ -5,9 +5,9 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
        $i = mysqli_get_server_version($link);
 
@@ -16,6 +16,8 @@
        var_dump($test);
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECT--
 int(1)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/045.phpt?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/mysqli/tests/045.phpt
diff -u php-src/ext/mysqli/tests/045.phpt:1.8 
php-src/ext/mysqli/tests/045.phpt:1.9
--- php-src/ext/mysqli/tests/045.phpt:1.8       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/045.phpt   Thu Jul 12 20:55:12 2007
@@ -1,9 +1,9 @@
 --TEST--
 mysqli_bind_result (SHOW)
 --SKIPIF--
-<?php  
+<?php
        require_once('skipif.inc');
-       require_once('skipifemb.inc'); 
+       require_once('skipifemb.inc');
 
        include "connect.inc";
        $link = mysqli_connect($host, $user, $passwd);
@@ -21,26 +21,36 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
        $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
        mysqli_execute($stmt);
 
-       mysqli_bind_result($stmt, $c1, $c2);    
+       mysqli_bind_result($stmt, $c1, $c2);
        mysqli_fetch($stmt);
-       mysqli_stmt_close($stmt);       
+       mysqli_stmt_close($stmt);
        $test = array ($c1,$c2);
 
        var_dump($test);
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECTF--
 array(2) {
   [0]=>
-  %s(4) "port"
+  string(4) "port"
+  [1]=>
+  string(%d) "%s"
+}
+done!
+--UEXPECTF--
+array(2) {
+  [0]=>
+  unicode(4) "port"
   [1]=>
-  %s(4) "%s"
+  unicode(%d) "%s"
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/046.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqli/tests/046.phpt
diff -u php-src/ext/mysqli/tests/046.phpt:1.5 
php-src/ext/mysqli/tests/046.phpt:1.6
--- php-src/ext/mysqli/tests/046.phpt:1.5       Sat Dec  4 08:50:33 2004
+++ php-src/ext/mysqli/tests/046.phpt   Thu Jul 12 20:55:12 2007
@@ -5,11 +5,11 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
 
        mysqli_query($link, "DROP TABLE IF EXISTS test_affected");
        mysqli_query($link, "CREATE TABLE test_affected (foo int)");
@@ -24,10 +24,12 @@
        mysqli_execute($stmt);
        $x = mysqli_stmt_affected_rows($stmt);
 
-       mysqli_stmt_close($stmt);       
+       mysqli_stmt_close($stmt);
        var_dump($x==1);
 
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECT--
 bool(true)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/047.phpt?r1=1.10&r2=1.11&diff_format=u
Index: php-src/ext/mysqli/tests/047.phpt
diff -u php-src/ext/mysqli/tests/047.phpt:1.10 
php-src/ext/mysqli/tests/047.phpt:1.11
--- php-src/ext/mysqli/tests/047.phpt:1.10      Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/047.phpt   Thu Jul 12 20:55:12 2007
@@ -5,11 +5,11 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
 
        mysqli_query($link, "DROP TABLE IF EXISTS test_affected");
        mysqli_query($link, "CREATE TABLE test_affected (foo int, bar 
varchar(10) character set latin1)");
@@ -31,14 +31,15 @@
        while ($field = mysqli_fetch_field($result)) {
                var_dump($field);
        }
-    
+
        print_r(mysqli_fetch_lengths($result));
-    
+
        mysqli_free_result($result);
 
 
-       mysqli_stmt_close($stmt);       
+       mysqli_stmt_close($stmt);
        mysqli_close($link);
+       print "done!";
 ?>
 --EXPECTF--
 === fetch_fields ===
@@ -194,6 +195,7 @@
   ["decimals"]=>
   int(0)
 }
+done!
 --UEXPECTF--
 === fetch_fields ===
 array(2) {
@@ -348,3 +350,4 @@
   [u"decimals"]=>
   int(0)
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/048.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqli/tests/048.phpt
diff -u php-src/ext/mysqli/tests/048.phpt:1.5 
php-src/ext/mysqli/tests/048.phpt:1.6
--- php-src/ext/mysqli/tests/048.phpt:1.5       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/048.phpt   Thu Jul 12 20:55:12 2007
@@ -1,29 +1,29 @@
 --TEST--
-mysqli bind_result (OO-Style) 
+mysqli bind_result (OO-Style)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = mysqli_connect($host, $user, $passwd);
+       $mysql = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       $mysql->select_db("test");              
+       $mysql->select_db($db);
        $mysql->query("DROP TABLE IF EXISTS test_fetch_null");
 
        $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
-                                                       col3 int, col4 bigint, 
+                                                       col3 int, col4 bigint,
                                                        col5 float, col6 double,
-                                                       col7 date, col8 time, 
-                                                       col9 varbinary(10), 
+                                                       col7 date, col8 time,
+                                                       col9 varbinary(10),
                                                        col10 varchar(50),
                                                        col11 char(20))");
-  
+
        $mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) 
VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
 
        $stmt = $mysql->prepare("SELECT col1, col2, col3, col4, col5, col6, 
col7, col8, col9, col10, col11 from test_fetch_null");
-       $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, 
$c11); 
+       $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, 
$c11);
        $stmt->execute();
 
        $stmt->fetch();
@@ -34,6 +34,7 @@
 
        $stmt->close();
        $mysql->close();
+       print "done!";
 ?>
 --EXPECTF--
 array(11) {
@@ -56,7 +57,34 @@
   [8]=>
   NULL
   [9]=>
-  %s(4) "foo1"
+  string(4) "foo1"
+  [10]=>
+  string(4) "1000"
+}
+done!
+--UEXPECTF--
+array(11) {
+  [0]=>
+  int(1)
+  [1]=>
+  NULL
+  [2]=>
+  NULL
+  [3]=>
+  NULL
+  [4]=>
+  NULL
+  [5]=>
+  NULL
+  [6]=>
+  NULL
+  [7]=>
+  NULL
+  [8]=>
+  NULL
+  [9]=>
+  unicode(4) "foo1"
   [10]=>
-  %s(4) "1000"
+  unicode(4) "1000"
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/049.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/mysqli/tests/049.phpt
diff -u php-src/ext/mysqli/tests/049.phpt:1.6 
php-src/ext/mysqli/tests/049.phpt:1.7
--- php-src/ext/mysqli/tests/049.phpt:1.6       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/049.phpt   Thu Jul 12 20:55:12 2007
@@ -1,16 +1,16 @@
 --TEST--
-mysql_fetch_row (OO-Style) 
+mysql_fetch_row (OO-Style)
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 <?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = mysqli_connect($host, $user, $passwd);
+       $mysql = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       $mysql->select_db("test");              
+       $mysql->select_db($db);
        $result = $mysql->query("SELECT DATABASE()");
        $row = $result->fetch_row();
        $result->close();
@@ -18,9 +18,17 @@
        var_dump($row);
 
        $mysql->close();
+       print "done!";
 ?>
 --EXPECTF--
 array(1) {
   [0]=>
-  %s(4) "test"
+  string(%d) "%s"
+}
+done!
+--UEXPECTF--
+array(1) {
+  [0]=>
+  unicode(%d) "%s"
 }
+done!
\ No newline at end of file

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to