key); $this->kp = 'test'; } public function testEnsuresKeysArePassed() { $this->expectException(\InvalidArgumentException::class); $c = new CloudFrontClient([ 'region' => 'us-west-2', 'version' => 'latest' ]); $c->getSignedUrl([]); } /** @doesNotPerformAssertions */ public function testCreatesSignedUrl() { $c = new CloudFrontClient([ 'region' => 'us-west-2', 'version' => 'latest' ]); $c->getSignedUrl([ 'private_key' => $this->key, 'key_pair_id' => $this->kp, 'url' => 'https://foo.bar.com', 'expires' => strtotime('+10 minutes'), ]); } /** @doesNotPerformAssertions */ public function testCreatesSignedCookie() { $c = new CloudFrontClient([ 'region' => 'us-west-2', 'version' => 'latest' ]); $c->getSignedCookie([ 'private_key' => $this->key, 'key_pair_id' => $this->kp, 'url' => 'https://foo.bar.com', 'expires' => strtotime('+10 minutes'), ]); } }