REST API: update the URLs in RestAPIUserTest.php.

This commit is contained in:
Xebax
2016-06-18 19:15:39 +02:00
parent 3b662d6ed8
commit 388839296e

View File

@@ -147,7 +147,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
{
global $conf,$user,$langs,$db;
$url = $this->api_url.'/user/123456789?api_key='.$this->api_key;
$url = $this->api_url.'/users/123456789?api_key='.$this->api_key;
//$addheaders=array('Content-Type: application/json');
print __METHOD__." Request url=".$url."\n";
@@ -159,7 +159,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
$this->assertNotNull($object, "Parsing of json result must no be null");
$this->assertEquals(404, $object['error']['code']);
$url = $this->api_url.'/user/1?api_key='.$this->api_key;
$url = $this->api_url.'/users/1?api_key='.$this->api_key;
print __METHOD__." Request url=".$url."\n";
$result=getURLContent($url, 'GET', '', 1, array());
@@ -174,7 +174,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
public function testRestCreateUser() {
// attemp to create without mandatory fields :
$url = $this->api_url.'/user?api_key='.$this->api_key;
$url = $this->api_url.'/users?api_key='.$this->api_key;
$addheaders=array('Content-Type: application/json');
$bodyobj = array(