add system-info method
This commit is contained in:
parent
a2e1eb8dd6
commit
6927b38336
@ -171,4 +171,19 @@ abstract class AbstractLoader
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns system version, public and technical urls
|
||||
*
|
||||
* @return \RetailCrm\Response\ApiResponse
|
||||
*/
|
||||
public function systemInfo()
|
||||
{
|
||||
return $this->client->makeRequest(
|
||||
$this->crmUrl . 'api/system-info',
|
||||
"GET",
|
||||
[],
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -74,4 +74,22 @@ class CommonMethodsTest extends TestCase
|
||||
static::assertTrue($response->isSuccessful());
|
||||
static::assertGreaterThan(0, count($response['settings']));
|
||||
}
|
||||
|
||||
/**
|
||||
* System info
|
||||
*
|
||||
* @group api_methods
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testSystemInfo()
|
||||
{
|
||||
$client = static::getApiClient();
|
||||
|
||||
$response = $client->request->systemInfo();
|
||||
|
||||
static::assertEquals(200, $response->getStatusCode());
|
||||
static::assertTrue($response->isSuccessful());
|
||||
static::assertNotEmpty($response['systemVersion']);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user