OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
zaws-ses
/
vendor
/
aws
/
aws-sdk-php
/
tests
/
CloudFront
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/03/2025 08:49:45 AM
rwxr-xr-x
📄
CloudFrontClientTest.php
1.58 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
CookieSignerTest.php
2.95 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
SignerTest.php
5.79 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
UrlSignerTest.php
5.4 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
fixtures
-
03/03/2025 08:49:44 AM
rwxr-xr-x
Editing: CloudFrontClientTest.php
Close
<?php namespace Aws\Test\CloudFront; use Aws\CloudFront\CloudFrontClient; use Yoast\PHPUnitPolyfills\TestCases\TestCase; /** * @covers Aws\CloudFront\CloudFrontClient */ class CloudFrontClientTest extends TestCase { protected $key; protected $kp; public function set_up() { openssl_pkey_export(openssl_pkey_new(),$this->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'), ]); } }