示例#1
0
 public function testAck()
 {
     $httpResponse = [202, null];
     $ackKeys = ['User-1234-1', 'Source-1234-1'];
     $http = $this->getMockBuilder('\\BaseCRM\\HttpClient')->disableOriginalConstructor()->getMock();
     $http->expects($this->once())->method('post')->with('/sync/ack', ['ack_keys' => $ackKeys], ['headers' => ['X-Basecrm-Device-UUID' => $this->deviceUUID]])->will($this->returnValue($httpResponse));
     $sync = new SyncService($http);
     $this->assertTrue($sync->ack($this->deviceUUID, $ackKeys));
 }