Clean code
This commit is contained in:
parent
e590fb36ad
commit
11b15557eb
@ -314,11 +314,13 @@ class Users extends DolibarrApi
|
|||||||
/**
|
/**
|
||||||
* Update account
|
* Update account
|
||||||
*
|
*
|
||||||
* @param int $id Id of account to update
|
* @param int $id Id of account to update
|
||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return array
|
* @return array|mixed Record after update
|
||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException 401 Not allowed
|
||||||
|
* @throws RestException 404 Not found
|
||||||
|
* @throws RestException 500 System error
|
||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -169,7 +169,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
|
|||||||
$this->assertEquals($result['curl_error_no'], '');
|
$this->assertEquals($result['curl_error_no'], '');
|
||||||
$object=json_decode($result['content'], true);
|
$object=json_decode($result['content'], true);
|
||||||
$this->assertNotNull($object, "Parsing of json result must not be null");
|
$this->assertNotNull($object, "Parsing of json result must not be null");
|
||||||
$this->assertEquals(404, $object['error']['code']);
|
$this->assertEquals(404, $object['error']['code'], 'Error code is not 404');
|
||||||
|
|
||||||
$url = $this->api_url.'/users/1?api_key='.$this->api_key;
|
$url = $this->api_url.'/users/1?api_key='.$this->api_key;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user