public function testCopyPrivatePropertyFromSubClassObject() { $obj1 = new SubClass(); $obj1->setPrivateProperty('Modified private property value of BaseClass'); $obj2 = new BaseClass(); $obj2->copyPrivateProperty($obj1); $this->assertEquals('Modified private property value of BaseClass', $obj2->getPrivateProperty()); $obj3 = new SubClass(); $obj3->copyPrivateProperty($obj1); $this->assertEquals('Modified private property value of BaseClass', $obj3->getPrivateProperty()); }