List:Commits« Previous MessageNext Message »
From:uwendel Date:July 3 2007 1:35pm
Subject:PHP mysqlnd svn commit: r596 - trunk/tests/ext/mysqli
View as plain text  
Author: uwendel
Date: 2007-07-03 15:35:36 +0200 (Tue, 03 Jul 2007)
New Revision: 596

Added:
   trunk/tests/ext/mysqli/mysqli_class_mysqli_driver_reflection.phpt
   trunk/tests/ext/mysqli/mysqli_class_mysqli_reflection.phpt
   trunk/tests/ext/mysqli/mysqli_class_mysqli_result_reflection.phpt
   trunk/tests/ext/mysqli/mysqli_class_mysqli_warning_reflection.phpt
   trunk/tests/ext/mysqli/reflection_tools.inc
Log:
Adding a bunch of new mysqlnd only tests that use Reflection to inspect the ext/mysqli
classes. The tests are not very portable and thus I decided to keep them only up to 
date for one specific version of ext/mysqli (mysqlnd version xyz not libmysql version
abc). What gets tested is also tested in the portable tests 
mysqli_class_mysqli_*_interface.phpt, therefore we do not loose much when we run those
tests only on mysqlnd version xyz (which will make keeping the tests up to date 
easier). All of them should pass on PHP6 @ ext/mysqli @ mysqlnd Revision 576+


Added: trunk/tests/ext/mysqli/mysqli_class_mysqli_driver_reflection.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_class_mysqli_driver_reflection.phpt	2007-07-03 13:29:59
UTC (rev 595)
+++ trunk/tests/ext/mysqli/mysqli_class_mysqli_driver_reflection.phpt	2007-07-03 13:35:36
UTC (rev 596)
@@ -0,0 +1,40 @@
+--TEST--
+Interface of the class mysqli_driver - Reflection
+--SKIPIF--
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifemb.inc');
+require_once('connect.inc');
+if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5))
+    die("skip Reflection not available before PHP 5 (found PHP $tmp)");
+    
+/* 
+    Let's not deal with cross-version issues in the EXPECTF/UEXPECTF.
+    Most of the things which we test are covered by mysqli_class_*_interface.phpt.
+    Those tests go into the details and are aimed to be a development tool, no more.
+*/    
+if (!$IS_MYSQLND)
+    die("skip Test has been written for the latest version of mysqlnd only");
+if ($MYSQLND_VERSION < 576)
+    die("skip Test requires mysqlnd Revision 576 or newer");
+?>
+--FILE--
+<?php    
+    require_once('reflection_tools.inc');
+    $class = new ReflectionClass('mysqli_driver');
+    inspectClass($class);    
+    print "done!";
+?>
+--EXPECTF--
+Inspecting class 'mysqli_driver'
+isInternal: yes
+isUserDefined: no
+isInstantiable: yes
+isInterface: no
+isAbstract: no
+isFinal: yes
+isIteratable: no
+Modifiers: '%d'
+Parent Class: ''
+Extension: 'mysqli'
+done!
\ No newline at end of file

Added: trunk/tests/ext/mysqli/mysqli_class_mysqli_reflection.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_class_mysqli_reflection.phpt	2007-07-03 13:29:59 UTC
(rev 595)
+++ trunk/tests/ext/mysqli/mysqli_class_mysqli_reflection.phpt	2007-07-03 13:35:36 UTC
(rev 596)
@@ -0,0 +1,649 @@
+--TEST--
+Interface of the class mysqli - Reflection
+--SKIPIF--
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifemb.inc');
+require_once('connect.inc');
+
+if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5))
+    die("skip Reflection not available before PHP 5 (found PHP $tmp)"); 
+/* 
+    Let's not deal with cross-version issues in the EXPECTF/UEXPECTF.
+    Most of the things which we test are covered by mysqli_class_*_interface.phpt.
+    Those tests go into the details and are aimed to be a development tool, no more.
+*/    
+if (!$IS_MYSQLND)
+    die("skip Test has been written for the latest version of mysqlnd only");
+if ($MYSQLND_VERSION < 576)
+    die("skip Test requires mysqlnd Revision 576 or newer");
+    
+?>
+--FILE--
+<?php    
+    require_once('reflection_tools.inc');
+    $class = new ReflectionClass('mysqli');
+    inspectClass($class);    
+    print "done!";
+?>
+--EXPECTF--
+Inspecting class 'mysqli'
+isInternal: yes
+isUserDefined: no
+isInstantiable: yes
+isInterface: no
+isAbstract: no
+isFinal: no
+isIteratable: no
+Modifiers: '0'
+Parent Class: ''
+Extension: 'mysqli'
+
+Inspecting method 'mysqli'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'autocommit'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'change_user'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'character_set_name'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'client_encoding'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'close'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'commit'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'connect'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'dump_debug_info'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'escape_string'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'get_charset'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'get_client_info'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'get_server_info'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'get_warnings'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'init'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'kill'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'more_results'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'multi_query'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'mysqli'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'next_result'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'options'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'ping'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'prepare'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'query'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'real_connect'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'real_escape_string'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'real_query'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'rollback'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'select_db'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'set_charset'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'set_local_infile_default'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'set_local_infile_handler'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'set_opt'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'stat'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'stmt_init'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'store_result'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'thread_safe'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'use_result'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+done!
\ No newline at end of file

Added: trunk/tests/ext/mysqli/mysqli_class_mysqli_result_reflection.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_class_mysqli_result_reflection.phpt	2007-07-03 13:29:59
UTC (rev 595)
+++ trunk/tests/ext/mysqli/mysqli_class_mysqli_result_reflection.phpt	2007-07-03 13:35:36
UTC (rev 596)
@@ -0,0 +1,297 @@
+--TEST--
+Interface of the class mysqli_result - Reflection
+--SKIPIF--
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifemb.inc');
+require_once('connect.inc');
+
+if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5))
+    die("skip Reflection not available before PHP 5 (found PHP $tmp)"); 
+    
+/* 
+    Let's not deal with cross-version issues in the EXPECTF/UEXPECTF.
+    Most of the things which we test are covered by mysqli_class_*_interface.phpt.
+    Those tests go into the details and are aimed to be a development tool, no more.
+*/    
+if (!$IS_MYSQLND)
+    die("skip Test has been written for the latest version of mysqlnd only");
+if ($MYSQLND_VERSION < 576)
+    die("skip Test requires mysqlnd Revision 576 or newer");    
+?>
+--FILE--
+<?php    
+    require_once('reflection_tools.inc');
+    $class = new ReflectionClass('mysqli_result');
+    inspectClass($class);    
+    print "done!";
+?>
+--EXPECTF--
+Inspecting class 'mysqli_result'
+isInternal: yes
+isUserDefined: no
+isInstantiable: yes
+isInterface: no
+isAbstract: no
+isFinal: no
+isIteratable: no
+Modifiers: '0'
+Parent Class: ''
+Extension: 'mysqli'
+
+Inspecting method '__construct'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method '__construct'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'close'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'data_seek'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_all'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_array'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_assoc'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_field'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_field_direct'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_fields'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_object'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'fetch_row'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'field_count'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'field_seek'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'free'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'free_result'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+done!
\ No newline at end of file

Added: trunk/tests/ext/mysqli/mysqli_class_mysqli_warning_reflection.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_class_mysqli_warning_reflection.phpt	2007-07-03 13:29:59
UTC (rev 595)
+++ trunk/tests/ext/mysqli/mysqli_class_mysqli_warning_reflection.phpt	2007-07-03 13:35:36
UTC (rev 596)
@@ -0,0 +1,89 @@
+--TEST--
+Interface of the class mysqli_stmt - Reflection
+--SKIPIF--
+<?php 
+require_once('skipif.inc'); 
+require_once('skipifemb.inc');
+require_once('connect.inc');
+
+if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5))
+    die("skip Reflection not available before PHP 5 (found PHP $tmp)"); 
+    
+/* 
+    Let's not deal with cross-version issues in the EXPECTF/UEXPECTF.
+    Most of the things which we test are covered by mysqli_class_*_interface.phpt.
+    Those tests go into the details and are aimed to be a development tool, no more.
+*/    
+if (!$IS_MYSQLND)
+    die("skip Test has been written for the latest version of mysqlnd only");
+if ($MYSQLND_VERSION < 576)
+    die("skip Test requires mysqlnd Revision 576 or newer");
+?>
+--FILE--
+<?php    
+    require_once('reflection_tools.inc');
+    $class = new ReflectionClass('mysqli_warning');
+    inspectClass($class);    
+    print "done!";
+?>
+--EXPECTF--
+Inspecting class 'mysqli_warning'
+isInternal: yes
+isUserDefined: no
+isInstantiable: no
+isInterface: no
+isAbstract: no
+isFinal: yes
+isIteratable: no
+Modifiers: '%d'
+Parent Class: ''
+Extension: 'mysqli'
+
+Inspecting method '__construct'
+isFinal: no
+isAbstract: no
+isPublic: no
+isPrivate: no
+isProtected: yes
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method '__construct'
+isFinal: no
+isAbstract: no
+isPublic: no
+isPrivate: no
+isProtected: yes
+isStatic: no
+isConstructor: yes
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+
+Inspecting method 'next'
+isFinal: no
+isAbstract: no
+isPublic: yes
+isPrivate: no
+isProtected: no
+isStatic: no
+isConstructor: no
+isDestructor: no
+isInternal: yes
+isUserDefined: no
+returnsReference: no
+Modifiers: %d
+Number of Parameters: 0
+Number of Required Parameters: 0
+done!
\ No newline at end of file

Added: trunk/tests/ext/mysqli/reflection_tools.inc
===================================================================
--- trunk/tests/ext/mysqli/reflection_tools.inc	2007-07-03 13:29:59 UTC (rev 595)
+++ trunk/tests/ext/mysqli/reflection_tools.inc	2007-07-03 13:35:36 UTC (rev 596)
@@ -0,0 +1,121 @@
+<?php
+function inspectClass($class) {
+    
+        /* not used: public ReflectionClass[] getInterfaces()  */
+        
+        printf("\nInspecting class '%s'\n", $class->getName());
+        printf("isInternal: %s\n", ($class->isInternal()) ? 'yes' : 'no');
+        printf("isUserDefined: %s\n", ($class->isUserDefined()) ? 'yes' : 'no');
+        printf("isInstantiable: %s\n", ($class->isInstantiable()) ? 'yes' : 'no');
+        printf("isInterface: %s\n", ($class->isInterface()) ? 'yes' : 'no');
+        printf("isAbstract: %s\n", ($class->isAbstract()) ? 'yes' : 'no');
+        printf("isFinal: %s\n", ($class->isFinal()) ? 'yes' : 'no');
+        printf("isIteratable: %s\n", ($class->isIterateable()) ? 'yes' : 'no');
+        printf("Modifiers: '%d'\n", $class->getModifiers());
+        printf("Parent Class: '%s'\n", $class->getParentClass());
+        printf("Extension: '%s'\n", $class->getExtensionName());
+      
+        if ($method = $class->getConstructor())
+            inspectMethod($method);
+
+        if ($methods = $class->getMethods()) {
+              $tmp = array();
+              foreach ($methods as $method)
+                  $tmp[$method->getName()] = $method;
+          
+              ksort($tmp, SORT_STRING);
+              foreach ($tmp as $method)
+                  inspectMethod($method);        
+        }    
+        
+        if ($properties = $class->getProperties()) {            
+            $tmp = array();
+            foreach ($properties as $prop)
+                $tmp[$prop->getName()] = $prop;
+            ksort($tmp, SORT_STRING);
+            foreach ($tmp as $prop)
+                inspectProperty($prop);
+        }
+        
+        
+        if ($properties = $class->getDefaultProperties()) {            
+            ksort($properties, SORT_STRING);
+            foreach ($properties as $name => $v)
+                printf("Default property '%s'\n", $name);            
+        }
+        
+        if ($properties = $class->getStaticProperties()) {
+            ksort($properties, SORT_STRING);            
+            foreach ($properties as $name => $v)
+                printf("Static property '%s'\n", $name);            
+        }
+        
+        if ($constants = $class->getConstants()) {
+            ksort($constants, SORT_STRING);
+            foreach ($constant as $name => $value)
+                printf("Constant '%s' = '%s'\n", $name, $value);            
+        }
+      
+    }
+    
+    function inspectProperty(&$prop) {
+    
+        printf("\nInspecting property '%s'\n", $prop->getName());
+        printf("isPublic: %s\n", ($prop->isPublic()) ? 'yes' : 'no');
+        printf("isPrivate: %s\n", ($prop->isPrivate()) ? 'yes' : 'no');
+        printf("isProtected: %s\n", ($prop->isProtected()) ? 'yes' : 'no');
+        printf("isStatic: %s\n", ($prop->isStatic()) ? 'yes' : 'no');
+        printf("isDefault: %s\n", ($prop->isDefault()) ? 'yes' : 'no');
+        printf("Modifiers: %d\n", $prop->getModifiers());
+        // printf("Value\n"); var_export($prop->getValue());
+        
+    }
+    
+    function inspectMethod(&$method) {      
+      
+        printf("\nInspecting method '%s'\n", $method->getName());
+        printf("isFinal: %s\n", ($method->isFinal()) ? 'yes' : 'no');
+        printf("isAbstract: %s\n", ($method->isAbstract()) ? 'yes' : 'no');
+        printf("isPublic: %s\n", ($method->isPublic()) ? 'yes' : 'no');
+        printf("isPrivate: %s\n", ($method->isPrivate()) ? 'yes' : 'no');
+        printf("isProtected: %s\n", ($method->isProtected()) ? 'yes' : 'no');
+        printf("isStatic: %s\n", ($method->isStatic()) ? 'yes' : 'no');
+        printf("isConstructor: %s\n", ($method->isConstructor()) ? 'yes' : 'no');
+        printf("isDestructor: %s\n", ($method->isDestructor()) ? 'yes' : 'no');
+        printf("isInternal: %s\n", ($method->isInternal()) ? 'yes' : 'no');
+        printf("isUserDefined: %s\n", ($method->isUserDefined()) ? 'yes' : 'no');
+        printf("returnsReference: %s\n", ($method->returnsReference()) ? 'yes' :
'no');
+        printf("Modifiers: %d\n", $method->getModifiers());
+        printf("Number of Parameters: %d\n", $method->getNumberOfParameters());
+        printf("Number of Required Parameters: %d\n",
$method->getNumberOfRequiredParameters());  
+      
+        if ($params = $method->getParameters()) {
+          $tmp = array();
+          foreach ($params as $k => $param)
+              $tmp[$param->getName()] = $param;
+          
+          ksort($tmp, SORT_STRING);
+          foreach ($tmp as $param)
+              inspectParameter($method, $param);
+        }
+      
+        if ($static = $method->getStaticVariables()) {
+            sort($static, SORT_STRING);
+            printf("Static variables: %s\n", implode('/', $static));
+        }
+      
+    }
+    
+    function inspectParameter(&$method, &$param) {
+
+        printf("\nInspecting parameter '%s' of method '%s'\n", 
+              $param->getName(), $method->getName());
+        printf("isArray: %s\n", ($param->isArray()) ? 'yes': 'no');
+        printf("allowsNull: %s\n", ($param->allowsNull()) ? 'yes' : 'no');
+        printf("isPassedByReference: %s\n", ($param->isPassedByReference()) ? 'yes' :
'no');
+        printf("isOptional: %s\n", ($param->isOptional()) ? 'yes' : 'no');
+        printf("isDefaultValueAvailable: %s\n", ($param->isDefaultValueAvailable()) ?
'yes' : 'no');
+        // printf("getDefaultValue: %s\n", ($param->getDefaultValue()) ? 'yes' :
'no');
+      
+    }
+?>
\ No newline at end of file

Thread
PHP mysqlnd svn commit: r596 - trunk/tests/ext/mysqliuwendel3 Jul