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