REST API: update the URLs in RestAPIUserTest.php.
This commit is contained in:
parent
3b662d6ed8
commit
388839296e
@ -147,7 +147,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
global $conf,$user,$langs,$db;
|
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');
|
//$addheaders=array('Content-Type: application/json');
|
||||||
|
|
||||||
print __METHOD__." Request url=".$url."\n";
|
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->assertNotNull($object, "Parsing of json result must no be null");
|
||||||
$this->assertEquals(404, $object['error']['code']);
|
$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";
|
print __METHOD__." Request url=".$url."\n";
|
||||||
$result=getURLContent($url, 'GET', '', 1, array());
|
$result=getURLContent($url, 'GET', '', 1, array());
|
||||||
@ -174,7 +174,7 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testRestCreateUser() {
|
public function testRestCreateUser() {
|
||||||
|
|
||||||
// attemp to create without mandatory fields :
|
// 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');
|
$addheaders=array('Content-Type: application/json');
|
||||||
|
|
||||||
$bodyobj = array(
|
$bodyobj = array(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user