Convenience function for generating string of why a reading wasn't recorded for a side.
public getTextForSide ( $side ) : string | ||
$side | ||
리턴 | string |
/** * @dataProvider getTextForSide_Provider */ public function testgetTextForSide($side, $readings, $unable, $eye_missing, $res) { $readingMock = $this->getMockBuilder('\\OEModule\\OphCiExamination\\models\\OphCiExamination_VisualAcuity_Reading')->setMethods(array('init'))->getMock(); $test = new models\Element_OphCiExamination_VisualAcuity(); if ($side == 'left') { $test->eye_id = Eye::LEFT; } else { $test->eye_id = Eye::RIGHT; } if ($readings) { $test->{$side . '_readings'} = array($readingMock); } $test->{$side . '_unable_to_assess'} = $unable; $test->{$side . '_eye_missing'} = $eye_missing; $this->assertEquals($res, $test->getTextForSide($side)); }