public function getProcedureCount() { $total = count($this->procedures); if ($this->eye_id == Eye::BOTH) { $total *= 2; } return $total; }
public function testProcedureCountBothEyes() { $op = new Element_OphTrOperationbooking_Operation(); $op->procedures = array(new Procedure(), new Procedure()); $op->eye_id = Eye::BOTH; $this->assertEquals($op->getProcedureCount(), 4); }