/** * @param Bridge_Element $element * * @return BridgeJob */ private function upload_element(\Bridge_Element $element) { $account = $element->get_account(); $element->set_status(\Bridge_Element::STATUS_PROCESSING); $dist_id = null; try { $dist_id = $account->get_api()->upload($element->get_record(), $element->get_datas()); $element->set_uploaded_on(new \DateTime()); } catch (\Exception $e) { $this->log('debug', 'Error while uploading : ' . $e->getMessage()); $element->set_status(\Bridge_Element::STATUS_ERROR); } $element->set_dist_id($dist_id); return $this; }
public function testGet_record() { $this->assertInstanceOf('record_adapter', $this->object->get_record()); $this->assertEquals(self::$DI['record_1']->get_sbas_id(), $this->object->get_record()->get_sbas_id()); $this->assertEquals(self::$DI['record_1']->get_record_id(), $this->object->get_record()->get_record_id()); }