Configuration of connecting - do not allow to change (remove setters)

This commit is contained in:
Meritoo
2017-09-28 20:13:54 +02:00
parent 5061f5a295
commit a6866d994c
3 changed files with 43 additions and 156 deletions

View File

@@ -68,9 +68,15 @@ class ClientTest extends BaseTestCase
->method('runMethod')
->willReturn([]);
$this->configuration->setDebugMode($debugMode);
$client = new Client($this->configuration, $rpcClientManager, $sessionManager);
$configuration = new ConnectionConfiguration(
$this->configuration->getBaseUrl(),
$this->configuration->getUsername(),
$this->configuration->getPassword(),
$debugMode,
$this->configuration->isVerifySslCertificateOn()
);
$client = new Client($configuration, $rpcClientManager, $sessionManager);
static::assertInstanceOf(Result::class, $client->run($method, $arguments));
}