function it_should_set_parent_on_children($child) { $child->setParent($this)->shouldBeCalled(); $this->addChild($child); }