/** * Should delete parent and children/sibling recursivelu * */ function testDelete_Deep() { $this->object->AddChild($this->child); $this->object->AddSibling($this->sibling); $this->parent_->AddObject($this->object); $this->parent_->Save(); $this->parent_->Delete(true); $someParent = new parent_(); $parentList = $someParent->GetList(array(array("parent_Id", ">", 0))); $this->assertEquals(0, sizeof($parentList)); $someObject = new object(); $objectList = $someObject->GetList(array(array("objectId", ">", 0))); $this->assertEquals(0, sizeof($objectList)); $someChild = new child(); $childList = $someChild->GetList(array(array("childId", ">", 0))); $this->assertEquals(0, sizeof($childList)); $someSibling = new sibling(); $siblingList = $someSibling->GetList(array(array("siblingId", ">", 0))); $this->assertEquals(0, sizeof($siblingList)); }
function test10() { $s = new sibling('Jake'); $j = new sibling('John'); $j->add_sibling(new sibling('Jane')); $j->add_sibling(new sibling('Mary')); $s->add_sibling($j); $sibling_count = count($s->get_first_sibling()->siblings); echo "verifying \$foo()->method_call()->property works<br>\n"; echo "Result: " . ($sibling_count == 2 ? 'pass' : 'fail') . "<br><br>\n\n"; }