public function testTeacher() { $teacher = new Teacher("Teacher"); $groupLeader = new GroupLeader("GroupLeader"); $number = 10; for ($i = 1; $i <= $number; $i++) { $groupLeader->addGirl(new Girl("girl:{$i}")); } $teacher->commond($groupLeader); }
/** * send commond to group leader * @param GroupLeader $groupLeader [description] * @return [type] [description] */ public function commond(GroupLeader $groupLeader) { $groupLeader->countGirls(); }