From 8a5ee4b33a7636636c1ba1e610ea4c8655032b2c Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Fri, 10 Oct 2008 16:51:43 +0000 Subject: [PATCH] - Fixed tests --- ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt | 8 +++----- .../tests/pdo_mysql_stmt_fetch_serialize_simple.phpt | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt index 73ed5a2eab9..5886a82c88c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt @@ -130,13 +130,11 @@ object(myclass)#4 (1) { } 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::unserialize('C:7:"myclass":19:{Data from serialize}') myclass::__construct(PDO shall not call __construct()) -object(myclass)#%d (2) { +object(myclass)#%d (1) { ["myprotected":protected]=> string(19) "a protected propery" - ["myobj"]=> - string(38) "C:7:"myclass":19:{Data from serialize}" } Using PDO::FETCH_CLASS to fetch the object from DB and unserialize it... @@ -148,4 +146,4 @@ object(myclass)#%d (2) { ["myobj"]=> string(38) "C:7:"myclass":19:{Data from serialize}" } -done! \ No newline at end of file +done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt index 4233d911e98..ba29e6a53ec 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt @@ -89,10 +89,8 @@ object(myclass)#%d (0) { } And now PDO using setFetchMode(PDO::FETCH:CLASS|PDO::FETCH_SERIALIZE) + fetch()... -myclass::__set('myobj', 'Data fetched from DB to be given to unserialize()') +myclass::unserialize('Data fetched from DB to be given to unserialize()') myclass::__construct('Called by PDO') - note that it must not be called when unserializing -object(myclass)#%d (1) { - ["myobj"]=> - string(49) "Data fetched from DB to be given to unserialize()" +object(myclass)#%d (0) { } -done! \ No newline at end of file +done!