append(new Result(array(true))); $cloudFrontClient = new CloudFrontClient([ 'profile' => AWS_PROFILE, 'version' => CLOUDFRONT_VERSION, 'region' => AWS_REGION, 'handler' => $mock ]); } protected function tearDown(): void { unset($GLOBALS['cloudFrontClient']); } public function testDeletesADistribution() { $result = deleteDistribution( $GLOBALS['cloudFrontClient'], $GLOBALS['distributionId'], $GLOBALS['eTag'] ); $this->assertStringContainsString( 'https://cloudfront.amazonaws.com/' . CLOUDFRONT_VERSION . '/distribution/' . CLOUDFRONT_DISTRIBUTION_ID, $result ); } public function testGetsADistributionETag() { $result = getDistributionETag( $GLOBALS['cloudFrontClient'], $GLOBALS['distributionId'] ); $this->assertContains('https://cloudfront.amazonaws.com/' . CLOUDFRONT_VERSION . '/distribution/' . CLOUDFRONT_DISTRIBUTION_ID, $result); } }