Example #1
0
 /**
  * Copy platforms
  * 
  * @param int $source_id original Test Project identificator
  * @param int $target_id new Test Project identificator
  */
 private function copy_platforms($source_id, $target_id)
 {
     $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;
     $platform_mgr = new tlPlatform($this->db, $source_id);
     $old_new = null;
     $platformSet = $platform_mgr->getAll();
     if (!is_null($platformSet)) {
         $platform_mgr->setTestProjectID($target_id);
         foreach ($platformSet as $platform) {
             $op = $platform_mgr->create($platform['name'], $platform['notes']);
             $old_new[$platform['id']] = $op['id'];
         }
     }
     return $old_new;
 }