Merge branch 'master' into 179-missing-support-for-custom-hostname-update-properties

This commit is contained in:
Phil Young
2021-06-22 11:32:02 +01:00
committed by GitHub
2 changed files with 49 additions and 10 deletions

View File

@@ -14,6 +14,8 @@ class CustomHostnamesTest extends TestCase
{
$response = $this->getPsr7JsonResponseForFixture('Endpoints/createCustomHostname.json');
$customSsl = $this->getCustomSsl();
$mock = $this->getMockBuilder(\Cloudflare\API\Adapter\Adapter::class)->getMock();
$mock->method('post')->willReturn($response);
@@ -30,10 +32,13 @@ class CustomHostnamesTest extends TestCase
'settings' => [
'http2' => 'on',
'http3' => 'on',
'min_tls_version' => '1.2'
]
'min_tls_version' => '1.2',
],
'bundle_method' => 'optimal',
'custom_key' => $customSsl['key'],
'custom_certificate' => $customSsl['certificate'],
'wildcard' => true,
],
'wildcard' => true,
])
);
@@ -43,7 +48,18 @@ class CustomHostnamesTest extends TestCase
'http3' => 'on',
'min_tls_version' => '1.2'
];
$hostname->addHostname('023e105f4ecef8ad9ca31a8372d0c353', 'app.example.com', 'http', 'dv', $sslSettings, 'origin.example.com', true);
$hostname->addHostname(
'023e105f4ecef8ad9ca31a8372d0c353',
'app.example.com',
'http',
'dv',
$sslSettings,
'origin.example.com',
true,
'optimal',
$customSsl
);
$this->assertEquals('0d89c70d-ad9f-4843-b99f-6cc0252067e9', $hostname->getBody()->result->id);
}