Exemplo n.º 1
0
 /**
  * Checks the serialize/unserialize methods implemented
  * from the \Serializable interface.
  *
  * @return void
  */
 public function testSerializeAndUnserialize()
 {
     // initialize a ReflectionMethod instance and clone it
     $methodOne = new ReflectionMethod(__CLASS__, ReflectionMethodTest::METHOD_NAME);
     $clonedOne = clone $methodOne;
     // serialize/unserialize the ReflectionMethod
     $methodOne->unserialize($methodOne->serialize());
     // check that the two ReflectionMethod instances are equal
     $this->assertEquals($clonedOne, $methodOne);
 }