Skip to content

Commit f2d043e

Browse files
committed
test: key create
1 parent c7e42df commit f2d043e

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

tests/Feature/KeyTest.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@
99
class KeyTest extends TestCase
1010
{
1111
private $keyId = null;
12+
private $createKeyResponse = null;
13+
1214

1315
protected function setUp(): void
1416
{
1517
parent::setUp();
1618

17-
$response = $this->client()->keys->create([
19+
$res = $this->client()->keys->create([
1820
'description' => 'Admin key.',
1921
'actions' => ['*'],
2022
'collections' => ['*']
21-
]);;
22-
$this->keyId = $response['id'];
23-
$this->assertEquals($response['description'], 'Admin key.');
23+
]);
24+
$this->createKeyResponse = $res;
25+
$this->keyId = $res['id'];
26+
}
27+
28+
public function testCanCreateAKey(): void
29+
{
30+
$this->assertEquals($this->createKeyResponse['description'], 'Admin key.');
2431
}
2532

2633
public function testCanRetrieveAKey(): void

0 commit comments

Comments
 (0)