schedule() 공개 메소드

public schedule ( OphTrOperationbooking_Operation_Booking $booking, $operation_comments, $session_comments, $operation_comments_rtt, boolean $reschedule = false, null $cancellation_data = null, Element_OphTrOperationbooking_ScheduleOperation $schedule_op = null ) : array | boolean
$booking OphTrOperationbooking_Operation_Booking
$operation_comments
$session_comments
$operation_comments_rtt
$reschedule boolean
$cancellation_data null
$schedule_op Element_OphTrOperationbooking_ScheduleOperation
리턴 array | boolean
 public function testScheduleLocksRtt()
 {
     $referral = $this->referrals('referral1');
     $op = new Element_OphTrOperationbooking_Operation();
     $op->event_id = $this->event('event1')->id;
     $op->attributes = array('status_id' => 1, 'anaesthetic_type_id' => 1, 'referral_id' => $referral->id, 'decision_date' => date('Y-m-d', strtotime('previous week')), 'total_duration' => 1, 'senior_fellow_to_do' => 1, 'anaesthetist_preop_assessment' => 1, 'anaesthetic_choice_id' => 1, 'stop_medication' => 0, 'fast_track' => 0, 'special_equipment' => 0, 'organising_admission_user_id' => 0, 'any_grade_of_doctor' => 0, 'priority_id' => 1);
     $op->procedures = array(ComponentStubGenerator::generate('Procedure'));
     $schedule_op = ComponentStubGenerator::generate('Element_OphTrOperationbooking_ScheduleOperation');
     $schedule_op->expects($this->any())->method('isPatientAvailable')->will($this->returnValue(true));
     $booking = ComponentStubGenerator::generate('OphTrOperationbooking_Operation_Booking', array('session' => ComponentStubGenerator::generate('OphTrOperationbooking_Operation_Session', array('date' => date('Y-m-d', strtotime('next week')), 'theatre' => ComponentStubGenerator::generate('OphTrOperationbooking_Operation_Theatre', array('site_id' => 1))))));
     $booking->expects($this->any())->method('save')->will($this->returnValue(true));
     $booking->session->expects($this->any())->method('operationBookable')->will($this->returnValue(true));
     $booking->session->expects($this->any())->method('save')->will($this->returnValue(true));
     $res = $op->schedule($booking, '', '', '', false, null, $schedule_op);
     $this->assertEquals($this->rtt('rtt1')->id, $op->rtt_id);
 }