/** * Checks the serialize/unserialize methods implemented * from the \Serializable interface. * * @return void */ public function testSerializeAndUnserialize() { // initialize a Integer instance and clone it $integerOne = new Integer(17); $clonedOne = clone $integerOne; // serialize/unserialize the Integer instance $integerOne->unserialize($integerOne->serialize()); // check that the two Integer instances are equal $this->assertEquals($clonedOne, $integerOne); }