1
0
mirror of synced 2024-11-21 21:06:07 +03:00

add system-info method

This commit is contained in:
Vladimir Kolchin 2023-01-13 08:29:11 +01:00
parent a2e1eb8dd6
commit 6927b38336
2 changed files with 33 additions and 0 deletions

View File

@ -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
);
}
}

View File

@ -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']);
}
}