- Fixed tests

This commit is contained in:
Felipe Pena 2008-10-10 16:51:43 +00:00
parent a3c8772fd1
commit 8a5ee4b33a
2 changed files with 6 additions and 10 deletions

View File

@ -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!
done!

View File

@ -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!
done!