diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index be5128e..d590b8e 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -171,4 +171,19 @@ abstract class AbstractLoader true ); } + + /** + * Getting the system version, public and technical urls + * + * @return \RetailCrm\Response\ApiResponse + */ + public function systemInfo() + { + return $this->client->makeRequest( + $this->crmUrl . 'api/system-info', + "GET", + [], + true + ); + } } diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php index 210cbb0..ed13e3b 100755 --- a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -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']); + } }