]> granicus.if.org Git - php/commitdiff
Fixing some tests to expect unicode instead of (binary) strings.
authorUlf Wendel <uw@php.net>
Tue, 22 Jul 2008 18:33:28 +0000 (18:33 +0000)
committerUlf Wendel <uw@php.net>
Tue, 22 Jul 2008 18:33:28 +0000 (18:33 +0000)
ext/pdo_mysql/tests/bug_42499.phpt
ext/pdo_mysql/tests/bug_pecl_12925.phpt
ext/pdo_mysql/tests/bug_pecl_7976.phpt
ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt
ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt
ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt
ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt
ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt

index 6b05c17aad69eeb2fe42faa5fd5128d78a994b65..dfea81c19bc3bf1a3b6be50732289ffb7c8f91c3 100644 (file)
@@ -72,7 +72,7 @@ array(1) {
   [0]=>
   array(1) {
     ["_id"]=>
-    string(1) "a"
+    unicode(1) "a"
   }
 }
 
index 1e7cea5e488318073a5974d437693360dd8bc668..1d398ff854a81a7458ab847ab19d7d79470c87a5 100644 (file)
@@ -56,7 +56,7 @@ array(1) {
   [0]=>
   array(1) {
     ["id"]=>
-    string(1) "c"
+    unicode(1) "c"
   }
 }
 done!
\ No newline at end of file
index 29ca98ded427b65a5672e6a5f0c7bb773216b448..9df3afcf801355a947b5e1e5a619877310d105c1 100644 (file)
@@ -74,14 +74,14 @@ array(1) {
   [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
index 87e1a1ee0616b09826a72555a84786e555c18af0..470605a6a393ddb19c06b9a49a485a631029271a 100644 (file)
@@ -22,7 +22,7 @@ MySQLPDOTest::skip();
 
                        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 @@ MySQLPDOTest::skip();
                        }
 
                        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();
index c7a20372760e32aeea2bfc0d5fbbe0a0be854ff5..7d35ead7aebaec305167b599167e1ad25c6e6240 100644 (file)
@@ -85,7 +85,7 @@ $db = MySQLPDOTest::factory();
        $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) {
index eac6bf331fe52d6f7d1055537e4d72b2cc5078cf..a8cbde6ea677bb737bf5cf841f8bcc8d79755146 100644 (file)
@@ -49,7 +49,7 @@ $db = MySQLPDOTest::factory();
 
        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",
index aa7815dea8e32cecc574111ec078a63aee9917ee..aafad7085af3da4060fb41fd4bdce8d8aac1669a 100644 (file)
@@ -75,11 +75,11 @@ array(1) {
   [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
index 73ed5a2eab96e5921ab767c316d59abc28555cda..ea9bd0214cc4cad9496fccd78137e44f73e33911 100644 (file)
@@ -125,27 +125,27 @@ myclass::serialize()
 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
index 79ef0c34a296da9564fd5ec41483cf47535a55d9..881e6dc99081ad4811266ba22b6f61bd3ee2139b 100644 (file)
@@ -83,13 +83,13 @@ myclass::__set(null, -NULL-) 3
 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