Fix failing tests

This commit is contained in:
Matej Bačo
2026-04-28 17:05:30 +02:00
parent f5a732d231
commit 15917ac7ba
2 changed files with 16 additions and 1 deletions
@@ -9,6 +9,21 @@ class V24 extends Filter
// Convert 1.9.2 params to 1.9.3
public function parse(array $content, string $model): array
{
switch ($model) {
case 'project.createStandardKey':
$content = $this->parseKeyScopes($content);
break;
}
return $content;
}
protected function parseKeyScopes(array $content): array
{
if (!\is_array($content['scopes'] ?? null)) {
$content['scopes'] = [];
}
return $content;
}
}
+1 -1
View File
@@ -256,7 +256,7 @@ trait KeysBase
$this->assertNotEmpty($key['body']['secret']);
$this->assertStringStartsWith(API_KEY_DYNAMIC . '_', $key['body']['secret']);
$this->assertSame([], $key['body']['sdks']);
$this->assertNull($key['body']['accessedAt']);
$this->assertSame('', $key['body']['accessedAt']);
$dateValidator = new DatetimeValidator();
$this->assertSame(true, $dateValidator->isValid($key['body']['$createdAt']));