private function _genDiagnosisNotification($transactionId) { $res = new \Application\Proto\SupDiagnosisAsync\DiagnosisNotification(); $result = new \Application\Proto\Result(); $result->setCode('OK'); $result->setReason('Operation successful'); $res->setResult($result); $simId = new \Application\Proto\SupProvision\Sim\SimId(); $simId->setImsi('1288228282'); $res->setSimId($simId); $res->setTaskId('taskId'); $res->setType(\Application\Proto\SupDiagnosis\Diagnosis\DiagnosisType::TYPE_2); $res->setResult(\Application\Proto\SupDiagnosisAsync\DiagnosisNotification\DiagnosisResult::GSM_UP); $dateInterval = new \Application\Proto\DateInterval(); $dateInterval->setStartDate('2011-11-11'); $dateInterval->setEndDate('2011-12-11'); $res->setTime($dateInterval); $req = new \Application\Proto\AsyncNotification\Service\Request(); $req->setToken($transactionId); $req->setProto('business.service.supdiagnosisasync.diagnosisasync'); $req->message = $res; return $req; }
public function testNotifyDiagnostic() { $this->markTestIncomplete("Missing transaction at memcached"); $proto = new \Application\Proto\SupDiagnosisAsync\DiagnosisNotification(); $result = new \Application\Proto\Result(); $result->setCode(0); $result->setReason('GSM_UP'); $proto->setExecResult($result); $proto->setResult(1); $id = new \Application\Proto\SupProvision\Sim\SimId(); $id->setImsi('214074300000018'); $proto->setSimId($id); $proto->setTaskId(sha1(time())); return $this->_testNotify($proto, 'business.service.supdiagnosisasync.diagnosisasync.DiagnosisNotification', $proto->getTaskId()); }