mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 02:11:45 +01:00
Client - allow to get configuration of connection (add getter)
This commit is contained in:
@@ -119,6 +119,16 @@ class Client
|
||||
return new Result($method, $rawData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns configuration used while connecting to LimeSurvey's API
|
||||
*
|
||||
* @return ConnectionConfiguration
|
||||
*/
|
||||
public function getConfiguration()
|
||||
{
|
||||
return $this->configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns manager of the JsonRPC client used while connecting to LimeSurvey's API
|
||||
*
|
||||
|
||||
@@ -80,6 +80,12 @@ class ClientTest extends BaseTestCase
|
||||
static::assertInstanceOf(Result::class, $client->run($method, $arguments));
|
||||
}
|
||||
|
||||
public function testGetConfiguration()
|
||||
{
|
||||
$client = new Client($this->configuration);
|
||||
static::assertEquals($this->configuration, $client->getConfiguration());
|
||||
}
|
||||
|
||||
public function testGetRpcClientManagerVisibilityAndArguments()
|
||||
{
|
||||
static::assertMethodVisibilityAndArguments(Client::class, 'getRpcClientManager', OopVisibilityType::IS_PRIVATE);
|
||||
|
||||
Reference in New Issue
Block a user