/** * testReturnValueOfMagicSleepContainsContextProperty * * @return void */ public function testReturnValueOfMagicSleepContainsContextProperty() { $reference = new ASTClassOrInterfaceReference($this->getBuilderContextMock(), __CLASS__); $this->assertEquals(array('context', 'comment', 'metadata', 'nodes'), $reference->__sleep()); }
/** * The magic sleep method will be called by PHP's runtime environment right * before an instance of this class gets serialized. It should return an * array with those property names that should be serialized for this class. * * @return array * @since 0.10.0 */ public function __sleep() { $this->qualifiedName = $this->getType()->getNamespaceName() . '\\' . $this->getType()->getName(); return array_merge(array('qualifiedName'), parent::__sleep()); }
/** * The magic sleep method will be called by PHP's runtime environment right * before an instance of this class gets serialized. It should return an * array with those property names that should be serialized for this class. * * @return array(string) * @since 0.10.0 */ public function __sleep() { return array_merge(array('reference'), parent::__sleep()); }