mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix phpunit
This commit is contained in:
@@ -237,10 +237,8 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
|
|||||||
$this->assertEquals($result['curl_error_no'], '');
|
$this->assertEquals($result['curl_error_no'], '');
|
||||||
$object = json_decode($result['content'], true); // If success content is just an id, if not an array
|
$object = json_decode($result['content'], true); // If success content is just an id, if not an array
|
||||||
|
|
||||||
print_r('--------------------');
|
|
||||||
print_r($object);
|
|
||||||
$this->assertNotNull($object, "Parsing of json result must no be null");
|
$this->assertNotNull($object, "Parsing of json result must no be null");
|
||||||
$this->assertNotEquals(500, ((is_scalar($object) || empty($object['error']) || empty($object['error']['code'])) ? 0 : $object['error']['code']), (string) $object['error']['message']);
|
$this->assertNotEquals(500, ((is_scalar($object) || empty($object['error']) || empty($object['error']['code'])) ? 0 : $object['error']['code']), 'Error '.(empty($object['error']['message']) ? '' : $object['error']['message']));
|
||||||
$this->assertGreaterThan(0, $object, 'ID returned is no > 0');
|
$this->assertGreaterThan(0, $object, 'ID returned is no > 0');
|
||||||
|
|
||||||
// attempt to create duplicated user
|
// attempt to create duplicated user
|
||||||
|
|||||||
Reference in New Issue
Block a user