Clean code

This commit is contained in:
Laurent Destailleur 2020-12-24 02:09:11 +01:00
parent e590fb36ad
commit 11b15557eb
2 changed files with 7 additions and 5 deletions

View File

@ -314,11 +314,13 @@ class Users extends DolibarrApi
/**
* Update account
*
* @param int $id Id of account to update
* @param array $request_data Datas
* @return array
* @param int $id Id of account to update
* @param array $request_data Datas
* @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)
{

View File

@ -169,7 +169,7 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
$this->assertEquals($result['curl_error_no'], '');
$object=json_decode($result['content'], true);
$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;