uw Tue Jul 22 18:33:29 2008 UTC
Modified files:
/php-src/ext/pdo_mysql/tests bug_42499.phpt bug_pecl_12925.phpt
bug_pecl_7976.phpt
pdo_mysql_attr_case.phpt
pdo_mysql___construct_uri.phpt
pdo_mysql_fetch_both.phpt
pdo_mysql_prepare_native_placeholder_everywhere.phpt
pdo_mysql_stmt_fetchobject.phpt
pdo_mysql_stmt_fetch_serialize.phpt
Log:
Fixing some tests to expect unicode instead of (binary) strings.
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_42499.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/bug_42499.phpt
diff -u php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.1
php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.2
--- php-src/ext/pdo_mysql/tests/bug_42499.phpt:1.1 Mon Jul 21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/bug_42499.phpt Tue Jul 22 18:33:28 2008
@@ -72,7 +72,7 @@
[0]=>
array(1) {
["_id"]=>
- string(1) "a"
+ unicode(1) "a"
}
}
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt
diff -u php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt:1.1
php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt:1.2
--- php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt:1.1 Mon Jul 21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/bug_pecl_12925.phpt Tue Jul 22 18:33:28 2008
@@ -56,7 +56,7 @@
[0]=>
array(1) {
["id"]=>
- string(1) "c"
+ unicode(1) "c"
}
}
done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt
diff -u php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt:1.1
php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt:1.2
--- php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt:1.1 Mon Jul 21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/bug_pecl_7976.phpt Tue Jul 22 18:33:28 2008
@@ -74,14 +74,14 @@
[0]=>
array(1) {
["_one"]=>
- string(1) "1"
+ unicode(1) "1"
}
}
array(1) {
[0]=>
array(1) {
["_one"]=>
- string(1) "1"
+ unicode(1) "1"
}
}
done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt:1.2
--- php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt:1.1 Mon Jul 21
13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt Tue Jul 22
18:33:28 2008
@@ -85,7 +85,7 @@
$db->exec(sprintf('DROP TABLE IF EXISTS test'));
print "done!";
--EXPECTF--
-string(15) "PDO::CASE_LOWER"
+unicode(15) "PDO::CASE_LOWER"
array(2) {
[0]=>
array(6) {
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt:1.2
--- php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt:1.1 Mon Jul
21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt Tue Jul 22
18:33:28 2008
@@ -22,7 +22,7 @@
if ($fp = @fopen($file, 'w')) {
// ok, great we can create a file with a DSN in
it
- fwrite($fp, $dsn);
+ @fwrite($fp, $dsn);
fclose($fp);
clearstatcache();
assert(file_exists($file));
@@ -38,7 +38,7 @@
}
if ($fp = @fopen($file, 'w')) {
- fwrite($fp,
sprintf('mysql:dbname=letshopeinvalid;%s%s',
+ @fwrite($fp,
sprintf('mysql:dbname=letshopeinvalid;%s%s',
chr(0), $dsn));
fclose($fp);
clearstatcache();
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt:1.2
--- php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt:1.1 Mon Jul 21
13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt Tue Jul 22
18:33:28 2008
@@ -49,7 +49,7 @@
try {
- fetch(2, &$db, 'SELECT 1', array(0 => '1', '1' => '1'));
+ fetch(2, $db, 'SELECT 1', array(0 => '1', '1' => '1'));
} catch (PDOException $e) {
printf("[001] %s [%s] %s\n",
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt?r1=1.1&r2=1.2&diff_format=u
Index:
php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt
diff -u
php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt:1.2
---
php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt:1.1
Mon Jul 21 13:05:51 2008
+++
php-src/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt
Tue Jul 22 18:33:28 2008
@@ -75,11 +75,11 @@
[0]=>
array(3) {
["?"]=>
- string(2) "id"
+ unicode(2) "id"
["id"]=>
int(1)
["label"]=>
- string(4) "row1"
+ unicode(4) "row1"
}
}
done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt:1.2
--- php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt:1.1 Mon Jul
21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt Tue Jul 22
18:33:28 2008
@@ -83,13 +83,13 @@
myclass::__set(, -''-) 4
myclass::__construct(2, 3): 12 / 4
object(myclass)#%d (4) {
- ["set_calls":"myclass":private]=>
+ [u"set_calls":u"myclass":private]=>
int(4)
- ["grp":protected]=>
+ [u"grp":protected]=>
NULL
- ["id"]=>
+ [u"id"]=>
string(1) "3"
- ["null"]=>
+ [u"null"]=>
NULL
}
done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt
diff -u php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt:1.1
php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt:1.2
--- php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt:1.1 Mon Jul
21 13:05:51 2008
+++ php-src/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt Tue Jul
22 18:33:28 2008
@@ -125,27 +125,27 @@
Unserializing the previously serialized object...
myclass::unserialize('Data from serialize')
object(myclass)#4 (1) {
- ["myprotected":protected]=>
- string(19) "a protected propery"
+ [u"myprotected":protected]=>
+ unicode(19) "a protected propery"
}
Using PDO::FETCH_CLASS|PDO::FETCH_SERIALIZE to fetch the object from DB and
unserialize it...
myclass::__set(myobj, 'C:7:"myclass":19:{Data from serialize}')
myclass::__construct(PDO shall not call __construct())
object(myclass)#%d (2) {
- ["myprotected":protected]=>
- string(19) "a protected propery"
- ["myobj"]=>
- string(38) "C:7:"myclass":19:{Data from serialize}"
+ [u"myprotected":protected]=>
+ unicode(19) "a protected propery"
+ [u"myobj"]=>
+ unicode(38) "C:7:"myclass":19:{Data from serialize}"
}
Using PDO::FETCH_CLASS to fetch the object from DB and unserialize it...
myclass::__set(myobj, 'C:7:"myclass":19:{Data from serialize}')
myclass::__construct(PDO shall call __construct())
object(myclass)#%d (2) {
- ["myprotected":protected]=>
- string(19) "a protected propery"
- ["myobj"]=>
- string(38) "C:7:"myclass":19:{Data from serialize}"
+ [u"myprotected":protected]=>
+ unicode(19) "a protected propery"
+ [u"myobj"]=>
+ unicode(38) "C:7:"myclass":19:{Data from serialize}"
}
done!
\ No newline at end of file
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php