| | 143 | |
|---|
| | 144 | /** |
|---|
| | 145 | * test against bug: ensure that the integrity of the serialized object |
|---|
| | 146 | * is maintained over several serialize/unserialize operations |
|---|
| | 147 | */ |
|---|
| | 148 | public function testSerializationIntegrity() |
|---|
| | 149 | { |
|---|
| | 150 | $this->stubBaseObject->setBar(808); |
|---|
| | 151 | $foo = serialize($this->serializedObject); |
|---|
| | 152 | $bar = unserialize($foo); |
|---|
| | 153 | $baz = serialize($bar); |
|---|
| | 154 | $test = unserialize($baz); |
|---|
| | 155 | $baseObject = $test->getUnserialized(); |
|---|
| | 156 | $this->assertIsA($baseObject, 'stub3stubBaseObject'); |
|---|
| | 157 | $this->assertEqual($baseObject->getBar(), 808); |
|---|
| | 158 | } |
|---|