ConnectionConfiguration - add $verifySslCertificate property - if is set to true, the SSL certificate verification is turned on, otherwise - turned off

It's useful while running application with custom, non-official SSL certificate, e.g. while development process.
This commit is contained in:
Meritoo
2017-09-27 21:32:28 +02:00
parent 0fbfc9780d
commit b3b0e66fb3
3 changed files with 63 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ class ConnectionConfigurationTest extends BaseTestCase
public function testConstructorVisibilityAndArguments()
{
static::assertConstructorVisibilityAndArguments(ConnectionConfiguration::class, OopVisibilityType::IS_PUBLIC, 4, 3);
static::assertConstructorVisibilityAndArguments(ConnectionConfiguration::class, OopVisibilityType::IS_PUBLIC, 5, 3);
}
/**
@@ -101,6 +101,18 @@ class ConnectionConfigurationTest extends BaseTestCase
static::assertTrue($this->simpleConfiguration->isDebugModeOn());
}
public function testSetVerifySslCertificate()
{
$this->simpleConfiguration->setVerifySslCertificate();
static::assertTrue($this->simpleConfiguration->isVerifySslCertificateOn());
$this->simpleConfiguration->setVerifySslCertificate(false);
static::assertFalse($this->simpleConfiguration->isVerifySslCertificateOn());
$this->simpleConfiguration->setVerifySslCertificate(true);
static::assertTrue($this->simpleConfiguration->isVerifySslCertificateOn());
}
public function testGetFullUrl()
{
$this->simpleConfiguration->setRemoteControlUrl('lorem/ipsum');