svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt
branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc trunk/ext/mysql/tests/mysql_affected_rows.phpt
trunk/ext/mysql/tests/mysql_insert_id.phpt trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc
| From: | Antony Dovgal | Date: | Sat, 29 Aug 2009 19:18:27 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc trunk/ext/mysql/tests/mysql_affected_rows.phpt trunk/ext/mysql/tests/mysql_insert_id.phpt trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60262@lists.php.net to get a copy of this message | ||
tony2001 Sat, 29 Aug 2009 19:18:27 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287885
Log:
fix tests
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt
U php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt
A php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc
U php/php-src/trunk/ext/mysql/tests/mysql_affected_rows.phpt
U php/php-src/trunk/ext/mysql/tests/mysql_insert_id.phpt
A php/php-src/trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc
Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt 2009-08-29 18:11:43 UTC
(rev 287884)
+++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_affected_rows.phpt 2009-08-29 19:18:27 UTC
(rev 287885)
@@ -4,6 +4,7 @@
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+require_once('skipifdefaultconnectfailure.inc');
?>
--FILE--
<?php
Modified: php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt 2009-08-29 18:11:43 UTC (rev
287884)
+++ php/php-src/branches/PHP_5_3/ext/mysql/tests/mysql_insert_id.phpt 2009-08-29 19:18:27 UTC (rev
287885)
@@ -4,6 +4,7 @@
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+require_once('skipifdefaultconnectfailure.inc');
?>
--FILE--
<?php
Added: php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc 2009-08-29 19:18:27
UTC (rev 287885)
@@ -0,0 +1,11 @@
+<?php
+if ($skip_on_connect_failure) {
+ if (!$link = @mysql_connect())
+ die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d]
%s", mysql_errno(), mysql_error()));
+
+ if (!@mysql_select_db($db, $link))
+ die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d]
%s", mysql_errno(), mysql_error()));
+
+ mysql_close($link);
+}
+?>
Property changes on: php/php-src/branches/PHP_5_3/ext/mysql/tests/skipifdefaultconnectfailure.inc
___________________________________________________________________
Added: svn:executable
+ *
Modified: php/php-src/trunk/ext/mysql/tests/mysql_affected_rows.phpt
===================================================================
--- php/php-src/trunk/ext/mysql/tests/mysql_affected_rows.phpt 2009-08-29 18:11:43 UTC (rev 287884)
+++ php/php-src/trunk/ext/mysql/tests/mysql_affected_rows.phpt 2009-08-29 19:18:27 UTC (rev 287885)
@@ -4,6 +4,7 @@
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+require_once('skipifdefaultconnectfailure.inc');
?>
--FILE--
<?php
@@ -12,8 +13,8 @@
$tmp = NULL;
$link = NULL;
-if (false !== ($tmp = @mysql_affected_rows()))
- printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+if (0 !== ($tmp = @mysql_affected_rows()))
+ printf("[001] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
if (null !== ($tmp = @mysql_affected_rows($link)))
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
Modified: php/php-src/trunk/ext/mysql/tests/mysql_insert_id.phpt
===================================================================
--- php/php-src/trunk/ext/mysql/tests/mysql_insert_id.phpt 2009-08-29 18:11:43 UTC (rev 287884)
+++ php/php-src/trunk/ext/mysql/tests/mysql_insert_id.phpt 2009-08-29 19:18:27 UTC (rev 287885)
@@ -4,6 +4,7 @@
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+require_once('skipifdefaultconnectfailure.inc');
?>
--FILE--
<?php
@@ -12,8 +13,8 @@
$tmp = NULL;
$link = NULL;
-if (false !== ($tmp = @mysql_insert_id()))
- printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
+if (0 !== ($tmp = @mysql_insert_id()))
+ printf("[001] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
if (NULL !== ($tmp = @mysql_insert_id($link)))
printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
Added: php/php-src/trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc
===================================================================
--- php/php-src/trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc (rev
0)
+++ php/php-src/trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc 2009-08-29 19:18:27 UTC (rev
287885)
@@ -0,0 +1,11 @@
+<?php
+if ($skip_on_connect_failure) {
+ if (!$link = @mysql_connect())
+ die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d]
%s", mysql_errno(), mysql_error()));
+
+ if (!@mysql_select_db($db, $link))
+ die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d]
%s", mysql_errno(), mysql_error()));
+
+ mysql_close($link);
+}
+?>
Property changes on: php/php-src/trunk/ext/mysql/tests/skipifdefaultconnectfailure.inc
___________________________________________________________________
Added: svn:executable
+ *