List:Commits« Previous MessageNext Message »
From:uwendel Date:July 11 2007 3:31pm
Subject:PHP mysqlnd svn commit: r718 - trunk/tests/ext/mysql
View as plain text  
Author: uwendel
Date: 2007-07-11 17:31:29 +0200 (Wed, 11 Jul 2007)
New Revision: 718

Modified:
   trunk/tests/ext/mysql/mysql_get_host_info.phpt
   trunk/tests/ext/mysql/mysql_get_proto_info.phpt
   trunk/tests/ext/mysql/mysql_get_server_info.phpt
   trunk/tests/ext/mysql/mysql_info.phpt
   trunk/tests/ext/mysql/mysql_insert_id.phpt
   trunk/tests/ext/mysql/mysql_list_dbs.phpt
Log:
Whitespace only for php.net.


Modified: trunk/tests/ext/mysql/mysql_get_host_info.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_get_host_info.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_get_host_info.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,34 +4,34 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include_once "connect.inc";
-        
-    if (false !== ($tmp = @mysql_get_host_info(NULL)))
-        printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-        
-    require "table.inc";    
-    if (!is_string($info = mysql_get_host_info($link)) || ('' === $info))
-        printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info),
$info);
-        
-    $def_info = mysql_get_host_info();
-    if ($def_info !== $info) {
-        printf("[004] Host info for the default link and the specified link differ, [%d]
%s\n",
-            mysql_errno(), mysql_error());
-            
-        var_dump($def_info);
-        var_dump($info);            
-    }
-                
-    if (ini_get('unicode.semantics') && !is_unicode($info)) {
-        printf("[005] Expecting Unicode error message!\n");
-        var_inspect($info);
-    }
-    
-    if (!is_null($tmp = @mysql_get_host_info($link, "too many arguments"))) {
-        printf("[006] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
-    }
+include_once "connect.inc";
 
-    print "done!";
+if (false !== ($tmp = @mysql_get_host_info(NULL)))
+	printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+require "table.inc";
+if (!is_string($info = mysql_get_host_info($link)) || ('' === $info))
+	printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
+
+$def_info = mysql_get_host_info();
+if ($def_info !== $info) {
+	printf("[004] Host info for the default link and the specified link differ, [%d] %s\n",
+		mysql_errno(), mysql_error());
+
+	var_dump($def_info);
+	var_dump($info);
+}
+
+if (ini_get('unicode.semantics') && !is_unicode($info)) {
+	printf("[005] Expecting Unicode error message!\n");
+	var_inspect($info);
+}
+
+if (!is_null($tmp = @mysql_get_host_info($link, "too many arguments"))) {
+	printf("[006] Expecting NULL/NULL got %s/%s\n", $tmp, gettype($tmp));
+}
+
+print "done!";
 ?>
 --EXPECTF--
 done!

Modified: trunk/tests/ext/mysql/mysql_get_proto_info.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_get_proto_info.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_get_proto_info.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,24 +4,24 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include_once "connect.inc";
-       
-    if (false !== ($tmp = @mysql_get_proto_info(NULL)))
-        printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);       

-    
-    require "table.inc";    
-    if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info))
-        printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
-        
-    if (!is_int($info2 = mysql_get_proto_info()) || (0 === $info2))
-        printf("[004] Expecting int/any_non_empty, got %s/%s\n", gettype($info2),
$info2);
-        
-    assert($info === $info2);
-        
-    if (NULL !== ($tmp = @mysql_get_proto_info('too many', 'arguments')))
-        printf("[005] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+include_once "connect.inc";
 
-    print "done!";
+if (false !== ($tmp = @mysql_get_proto_info(NULL)))
+	printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+require "table.inc";
+if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info))
+	printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
+
+if (!is_int($info2 = mysql_get_proto_info()) || (0 === $info2))
+	printf("[004] Expecting int/any_non_empty, got %s/%s\n", gettype($info2), $info2);
+
+assert($info === $info2);
+
+if (NULL !== ($tmp = @mysql_get_proto_info('too many', 'arguments')))
+	printf("[005] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+print "done!";
 ?>
 --EXPECTF--
 done!

Modified: trunk/tests/ext/mysql/mysql_get_server_info.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_get_server_info.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_get_server_info.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,33 +4,33 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
-        
-    if (false !== ($tmp = @mysql_get_server_info(NULL)))
-        printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-    
-    require "table.inc";    
-    if (!is_string($info = mysql_get_server_info($link)) || ('' === $info))
-        printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info),
$info);        
-        
-    $def_info = mysql_get_server_info();
-    if ($def_info !== $info) {
-        printf("[004] Server info for the default link and the specified link differ,
[%d] %s\n",
-            mysql_errno(), mysql_error());
-            
-        var_dump($def_info);
-        var_dump($info);            
-    }
-                
-    if (ini_get('unicode.semantics') && !is_unicode($info)) {
-        printf("[005] Expecting Unicode error message!\n");
-        var_inspect($info);
-    }
-    
-    if (NULL !== ($tmp = @mysql_get_server_info('too many', 'just too many')))
-        printf("[006] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+include "connect.inc";
 
-    print "done!";
+if (false !== ($tmp = @mysql_get_server_info(NULL)))
+	printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+require "table.inc";
+if (!is_string($info = mysql_get_server_info($link)) || ('' === $info))
+	printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
+
+$def_info = mysql_get_server_info();
+if ($def_info !== $info) {
+	printf("[004] Server info for the default link and the specified link differ, [%d]
%s\n",
+		mysql_errno(), mysql_error());
+
+	var_dump($def_info);
+	var_dump($info);
+}
+
+if (ini_get('unicode.semantics') && !is_unicode($info)) {
+	printf("[005] Expecting Unicode error message!\n");
+	var_inspect($info);
+}
+
+if (NULL !== ($tmp = @mysql_get_server_info('too many', 'just too many')))
+	printf("[006] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+
+print "done!";
 ?>
 --EXPECTF--
 done!

Modified: trunk/tests/ext/mysql/mysql_info.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_info.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_info.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,63 +4,63 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
-        
-    if (false !== ($tmp = @mysql_info()))
-        printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (NULL !== ($tmp = @mysql_info(NULL)))
-        printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);        
-    
-    require "table.inc";
-    if (!$res = mysql_query('INSERT INTO test(id, label) VALUES (100, "a")', $link))
-        printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));      
-    
-    if (false !== ($tmp = mysql_info($link)))
-        printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);    
-   
-    if (!$res = mysql_query('INSERT INTO test(id, label) VALUES (101, "a"), (102, "b")',
$link))
-        printf("[005] [%d] %s\n", mysql_errno($link), mysql_error($link));
-        
-    if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
-        printf("[006] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
      
-        
-    if (!$res = mysql_query('INSERT INTO test(id, label) SELECT id + 200, label FROM
test', $link))
-        printf("[007] [%d] %s\n", mysql_errno($link), mysql_error($link));
-        
-    if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
-        printf("[008] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
-                
-    if (!$res = mysql_query('ALTER TABLE test MODIFY label CHAR(2)', $link))
-        printf("[009] [%d] %s\n", mysql_errno($link), mysql_error($link));
-        
-    if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
-        printf("[010] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
              
-    
-    if (!$res = mysql_query('UPDATE test SET label = "b" WHERE id >= 100', $link))
-        printf("[011] [%d] %s\n", mysql_errno($link), mysql_error($link));
-        
-    if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
-        printf("[012] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (ini_get('unicode.semantics') && !is_unicode($tmp)) {
-        printf("[013] Expecting Unicode!\n");
-        var_inspect($info);
-    }
+include "connect.inc";
 
-    if (!is_string($def_tmp = mysql_info()) || ('' == $def_tmp))
-        printf("[014] Expecting string/any_non_empty, got %s/%s\n", gettype($def_tmp),
$def_tmp);  
-        
-    if ($def_tmp !== $tmp) {
-        printf("[015] Results differ for default link and specified link, [%d] %s\n",
-            mysql_errno(), mysql_error());
-        var_inspect($tmp);
-        var_inspect($def_tmp);
-    }
-        
-    // NOTE: no LOAD DATA INFILE test        
+if (false !== ($tmp = @mysql_info()))
+	printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
-    print "done!";
+if (NULL !== ($tmp = @mysql_info(NULL)))
+	printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+require "table.inc";
+if (!$res = mysql_query('INSERT INTO test(id, label) VALUES (100, "a")', $link))
+	printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (false !== ($tmp = mysql_info($link)))
+	printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query('INSERT INTO test(id, label) VALUES (101, "a"), (102, "b")',
$link))
+	printf("[005] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
+	printf("[006] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query('INSERT INTO test(id, label) SELECT id + 200, label FROM test',
$link))
+	printf("[007] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
+	printf("[008] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query('ALTER TABLE test MODIFY label CHAR(2)', $link))
+	printf("[009] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
+	printf("[010] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query('UPDATE test SET label = "b" WHERE id >= 100', $link))
+	printf("[011] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (!is_string($tmp = mysql_info($link)) || ('' == $tmp))
+	printf("[012] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp);
+
+if (ini_get('unicode.semantics') && !is_unicode($tmp)) {
+	printf("[013] Expecting Unicode!\n");
+	var_inspect($info);
+}
+
+if (!is_string($def_tmp = mysql_info()) || ('' == $def_tmp))
+	printf("[014] Expecting string/any_non_empty, got %s/%s\n", gettype($def_tmp),
$def_tmp);
+
+if ($def_tmp !== $tmp) {
+	printf("[015] Results differ for default link and specified link, [%d] %s\n",
+		mysql_errno(), mysql_error());
+	var_inspect($tmp);
+	var_inspect($def_tmp);
+}
+
+// NOTE: no LOAD DATA INFILE test
+
+print "done!";
 ?>
 --EXPECTF--
 done!
\ No newline at end of file

Modified: trunk/tests/ext/mysql/mysql_insert_id.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_insert_id.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_insert_id.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,58 +4,58 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
+include "connect.inc";
 
-    $tmp    = NULL;   
-    $link   = NULL;    
-    
-    if (false !== ($tmp = @mysql_insert_id()))
-        printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (false !== ($tmp = @mysql_insert_id($link)))
-        printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (!is_null($tmp = @mysql_insert_id($link, 'too many args')))
-        printf("[002a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);        
+$tmp    = NULL;
+$link   = NULL;
 
-    require('table.inc');
-    
-    if (0 !== ($tmp = mysql_insert_id($link)))
-        printf("[003] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) {
-        printf("[004] [%d] %s\n", mysql_errno($link), mysql_error($link));
-    }    
-    if (0 !== ($tmp = mysql_insert_id($link)))
-        printf("[005] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
-    mysql_free_result($res);        
+if (false !== ($tmp = @mysql_insert_id()))
+	printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
 
-    // no auto_increment column
-    if (!$res = mysql_query("INSERT INTO test(id, label) VALUES (100, 'a')", $link)) {
-        printf("[006] [%d] %s\n", mysql_errno($link), mysql_error($link));
-    }    
-    if (0 !== ($tmp = mysql_insert_id($link)))
-        printf("[007] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);    
-    
-    if (!$res = mysql_query("ALTER TABLE test MODIFY id INT NOT NULL AUTO_INCREMENT",
$link)) {
-        printf("[008] [%d] %s\n", mysql_errno($link), mysql_error($link));
-    }
-    if (!$res = mysql_query("INSERT INTO test(label) VALUES ('a')", $link)) {
-        printf("[009] [%d] %s\n", mysql_errno($link), mysql_error($link));
-    }    
-    if (0 === ($tmp = mysql_insert_id($link)))
-        printf("[010] Expecting int/not zero, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if ($tmp !== ($tmp2 = mysql_insert_id())) 
-        printf("[011] Expecting %s/%s, got %s/%s\n", 
-            gettype($tmp), $tmp,
-            gettype($tmp2), $tmp2);
-        
-    mysql_close($link);  
-    
-    var_dump(mysql_insert_id($link));
-      
-    print "done!";
+if (false !== ($tmp = @mysql_insert_id($link)))
+	printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!is_null($tmp = @mysql_insert_id($link, 'too many args')))
+	printf("[002a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+require('table.inc');
+
+if (0 !== ($tmp = mysql_insert_id($link)))
+	printf("[003] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) {
+	printf("[004] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+if (0 !== ($tmp = mysql_insert_id($link)))
+	printf("[005] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
+mysql_free_result($res);
+
+// no auto_increment column
+if (!$res = mysql_query("INSERT INTO test(id, label) VALUES (100, 'a')", $link)) {
+	printf("[006] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+if (0 !== ($tmp = mysql_insert_id($link)))
+	printf("[007] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
+
+if (!$res = mysql_query("ALTER TABLE test MODIFY id INT NOT NULL AUTO_INCREMENT", $link))
{
+	printf("[008] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+if (!$res = mysql_query("INSERT INTO test(label) VALUES ('a')", $link)) {
+	printf("[009] [%d] %s\n", mysql_errno($link), mysql_error($link));
+}
+if (0 === ($tmp = mysql_insert_id($link)))
+	printf("[010] Expecting int/not zero, got %s/%s\n", gettype($tmp), $tmp);
+
+if ($tmp !== ($tmp2 = mysql_insert_id()))
+	printf("[011] Expecting %s/%s, got %s/%s\n",
+		gettype($tmp), $tmp,
+		gettype($tmp2), $tmp2);
+
+mysql_close($link);
+
+var_dump(mysql_insert_id($link));
+
+print "done!";
 ?>
 --EXPECTF--
 Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on line %d

Modified: trunk/tests/ext/mysql/mysql_list_dbs.phpt
===================================================================
--- trunk/tests/ext/mysql/mysql_list_dbs.phpt	2007-07-11 15:28:34 UTC (rev 717)
+++ trunk/tests/ext/mysql/mysql_list_dbs.phpt	2007-07-11 15:31:29 UTC (rev 718)
@@ -4,44 +4,44 @@
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
-    include_once "connect.inc";
+include_once "connect.inc";
 
-    $tmp    = NULL;   
-    $link   = NULL;    
-       
-    if (false !== ($tmp = @mysql_list_dbs(NULL)))
-        printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (NULL !== ($tmp = @mysql_list_dbs($link, $link)))
-        printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);     
-            
-    require('table.inc');
-    
-    if (!$res = mysql_list_dbs($link))
-        printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
-     
-    if (!$num = mysql_num_rows($res))
-        printf("[004] Empty database list? [%d] %s\n", mysql_errno($link),
mysql_error($link));
-        
-    $row = mysql_fetch_array($res, MYSQL_NUM);
-    if (ini_get('unicode.semantics') && !is_unicode($row[0])) {
-        printf("[005] Check for unicode support\n");
-        var_inspect($row);
-    } 
-        
-    mysql_free_result($res);
+$tmp    = NULL;
+$link   = NULL;
 
-    if (!$res2 = mysql_list_dbs())
-        printf("[006] [%d] %s\n", mysql_errno(), mysql_error());
-        
-    $row2 = mysql_fetch_array($res2, MYSQL_NUM);
-    mysql_free_result($res2);
-    
-    assert($row === $row2);
-    
-    mysql_close($link);
-        
-    print "done!\n"; 
+if (false !== ($tmp = @mysql_list_dbs(NULL)))
+	printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+
+if (NULL !== ($tmp = @mysql_list_dbs($link, $link)))
+	printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+require('table.inc');
+
+if (!$res = mysql_list_dbs($link))
+	printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+if (!$num = mysql_num_rows($res))
+	printf("[004] Empty database list? [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+$row = mysql_fetch_array($res, MYSQL_NUM);
+if (ini_get('unicode.semantics') && !is_unicode($row[0])) {
+	printf("[005] Check for unicode support\n");
+	var_inspect($row);
+}
+
+mysql_free_result($res);
+
+if (!$res2 = mysql_list_dbs())
+	printf("[006] [%d] %s\n", mysql_errno(), mysql_error());
+
+$row2 = mysql_fetch_array($res2, MYSQL_NUM);
+mysql_free_result($res2);
+
+assert($row === $row2);
+
+mysql_close($link);
+
+print "done!\n";
 ?>
 --EXPECTF--
 done!

Thread
PHP mysqlnd svn commit: r718 - trunk/tests/ext/mysqluwendel11 Jul