Пример #1
0
 /**
  * @covers Malwarebytes\ZendeskBundle\Service\ApiService::updateUser
  */
 public function testUpdateUser()
 {
     $service = $this->apiService->setMethods(null)->getMock();
     $userId = 123;
     $data = array('foo' => 'bar');
     $preparedData = array('user' => $data);
     $response = array('response');
     $this->zendesk->expects($this->once())->method('call')->with("/users/{$userId}", json_encode($preparedData), 'PUT')->will($this->returnValue($response));
     $this->assertEquals($response, $service->setZendeskApi($this->zendesk)->updateUser($userId, $preparedData));
 }
Пример #2
0
 /**
  * Wraps a very, very stupid API without default param values
  * @param string $path
  * @return array
  */
 protected function _get($path)
 {
     return $this->_api->call($path, '', 'GET');
 }