/** * testMagicWakeupSetsParentOnChildMethods * * @return void * @group pdepend * @group pdepend::code * @group unittest */ public function testMagicWakeupSetsParentOnChildMethods() { $interface = new PHP_Depend_Code_Interface(__CLASS__); $method = new PHP_Depend_Code_Method(__FUNCTION__); $interface->addMethod($method); $interface->setContext($this->getMock('PHP_Depend_Builder_Context')); $method->setParent(null); $interface->__wakeup(); self::assertSame($interface, $method->getParent()); }