1
0
mirror of synced 2024-11-24 22:36:06 +03:00

add api/system-info method

This commit is contained in:
Pavel 2023-01-13 11:13:28 +03:00 committed by GitHub
commit 00ec04ec6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 0 deletions

View File

@ -171,4 +171,19 @@ abstract class AbstractLoader
true 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
);
}
} }

View File

@ -74,4 +74,22 @@ class CommonMethodsTest extends TestCase
static::assertTrue($response->isSuccessful()); static::assertTrue($response->isSuccessful());
static::assertGreaterThan(0, count($response['settings'])); 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']);
}
} }