List:Commits« Previous MessageNext Message »
From:uwendel Date:February 21 2007 2:52pm
Subject:PHP mysqlnd svn commit: r54 - trunk/ext/mysqli/tests
View as plain text  
Author: uwendel
Date: 2007-02-21 14:52:51 +0100 (Wed, 21 Feb 2007)
New Revision: 54

Added:
   trunk/ext/mysqli/tests/mysqli_get_cache_stats.phpt
   trunk/ext/mysqli/tests/mysqli_get_client_stats.phpt
   trunk/ext/mysqli/tests/mysqli_get_connection_stats.phpt
Log:
Added test templates for the three new, statistics functions. All of them are a stub and
need to be reworked.


Added: trunk/ext/mysqli/tests/mysqli_get_cache_stats.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_get_cache_stats.phpt	2007-02-20 21:35:02 UTC (rev 53)
+++ trunk/ext/mysqli/tests/mysqli_get_cache_stats.phpt	2007-02-21 13:52:51 UTC (rev 54)
@@ -0,0 +1,25 @@
+--TEST--
+mysqli_get_cache_stats()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php require_once('skipifemb.inc'); ?>
+<?PHP
+if (!function_exists('mysqli_get_cache_stats')) {
+    die("skip only available with mysqlnd");
+}
+?>
+--FILE--
+<?php        
+    $tmp = $link = null;
+    if (!is_null($tmp = @mysqli_get_cache_stats($link)))
+        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+        
+    include "connect.inc";        
+    
+    if (!is_array($info = mysqli_get_cache_stats()) || empty($info))
+        printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info),
$info);        
+
+    print "done!";
+?>
+--EXPECTF--
+I'm a stub
\ No newline at end of file

Added: trunk/ext/mysqli/tests/mysqli_get_client_stats.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_get_client_stats.phpt	2007-02-20 21:35:02 UTC (rev 53)
+++ trunk/ext/mysqli/tests/mysqli_get_client_stats.phpt	2007-02-21 13:52:51 UTC (rev 54)
@@ -0,0 +1,25 @@
+--TEST--
+mysqli_get_client_stats()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php require_once('skipifemb.inc'); ?>
+<?PHP
+if (!function_exists('mysqli_get_client_stats')) {
+    die("skip only available with mysqlnd");
+}
+?>
+--FILE--
+<?php        
+    $tmp = $link = null;
+    if (!is_null($tmp = @mysqli_get_client_stats($link)))
+        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+        
+    include "connect.inc";        
+    
+    if (!is_array($info = mysqli_get_client_stats()) || empty($info))
+        printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info),
$info);        
+
+    print "done!";
+?>
+--EXPECTF--
+I'm a stub
\ No newline at end of file

Added: trunk/ext/mysqli/tests/mysqli_get_connection_stats.phpt
===================================================================
--- trunk/ext/mysqli/tests/mysqli_get_connection_stats.phpt	2007-02-20 21:35:02 UTC (rev
53)
+++ trunk/ext/mysqli/tests/mysqli_get_connection_stats.phpt	2007-02-21 13:52:51 UTC (rev
54)
@@ -0,0 +1,25 @@
+--TEST--
+mysqli_get_connection_stats()
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+<?php require_once('skipifemb.inc'); ?>
+<?PHP
+if (!function_exists('mysqli_get_connection_stats')) {
+    die("skip only available with mysqlnd");
+}
+?>
+--FILE--
+<?php        
+    $tmp = $link = null;
+    if (!is_null($tmp = @mysqli_get_connection_stats($link)))
+        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+        
+    include "connect.inc";        
+    
+    if (!is_array($info = mysqli_get_connection_stats()) || empty($info))
+        printf("[002] Expecting array/any_non_empty, got %s/%s\n", gettype($info),
$info);        
+
+    print "done!";
+?>
+--EXPECTF--
+I'm a stub
\ No newline at end of file

Thread
PHP mysqlnd svn commit: r54 - trunk/ext/mysqli/testsuwendel22 Feb