Skip to content

Commit c8a200e

Browse files
committed
Demonstrate how to create a secret key for multiple IP addresses
1 parent ecd3f5c commit c8a200e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/SecretKeyTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ public function testCreateAutoIp()
2121
static::$_client->secretKey()->delete($keyId);
2222
}
2323

24+
public function testCreateMultiIps()
25+
{
26+
$keyId = static::$_client->secretKey()->create(join(',', ['192.168.0.1', '192.168.0.2']));
27+
$this->assertMatchesRegularExpression('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $keyId);
28+
static::$_client->secretKey()->delete($keyId);
29+
}
30+
2431
public function testCreateWithDescription()
2532
{
2633
$keyId = static::$_client->secretKey()->create('192.168.0.1', 'test key');

0 commit comments

Comments
 (0)