mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix failing tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']));
|
||||
|
||||
Reference in New Issue
Block a user