Exemplo n.º 1
0
 public function saveScheduleTrack($schedule, $params)
 {
     if (!empty($params['track']) && is_int($params['track'])) {
         $scheduleTrackService = new ScheduleTrackService();
         $scheduleTrackService->setManager($this->em);
         for ($i = 1; $i <= (int) $params['track']; $i++) {
             $scheduleTrackService->saveScheduleTrack($schedule, $i);
         }
     }
 }
Exemplo n.º 2
0
 public function testSaveScheduleTrack()
 {
     $scheduleTrackService = new ScheduleTrackService();
     $scheduleTrackService->setManager($this->em);
     $scheduleTrack = $scheduleTrackService->saveScheduleTrack($this->schedule, 3);
     $this->assertContains('Track 3', json_encode($scheduleTrack));
 }