mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix response model for adapters (frameworks)
This commit is contained in:
@@ -52,6 +52,12 @@ class XList extends Base
|
||||
{
|
||||
$frameworks = Config::getParam('frameworks');
|
||||
|
||||
foreach ($frameworks as $key => $framework) {
|
||||
if (!empty($framework['adapters'])) {
|
||||
$frameworks[$key]['adapters'] = \array_values($framework['adapters']);
|
||||
}
|
||||
}
|
||||
|
||||
$response->dynamic(new Document([
|
||||
'total' => count($frameworks),
|
||||
'frameworks' => \array_values($frameworks)
|
||||
|
||||
@@ -37,6 +37,7 @@ class SitesCustomClientTest extends Scope
|
||||
$this->assertArrayHasKey('variables', $template);
|
||||
$this->assertArrayHasKey('screenshotDark', $template);
|
||||
$this->assertArrayHasKey('screenshotLight', $template);
|
||||
$this->assertArrayHasKey('ada', $template);
|
||||
}
|
||||
|
||||
// List templates with pagination
|
||||
|
||||
@@ -1364,6 +1364,11 @@ class SitesCustomServerTest extends Scope
|
||||
$this->assertArrayHasKey('buildRuntime', $framework);
|
||||
$this->assertArrayHasKey('runtimes', $framework);
|
||||
$this->assertArrayHasKey('adapters', $framework);
|
||||
$this->assertIsArray($framework['adapters']);
|
||||
$this->assertArrayHasKey('key', $framework['adapters'][0]);
|
||||
$this->assertArrayHasKey('installCommand', $framework['adapters'][0]);
|
||||
$this->assertArrayHasKey('buildCommand', $framework['adapters'][0]);
|
||||
$this->assertArrayHasKey('outputDirectory', $framework['adapters'][0]);
|
||||
}
|
||||
|
||||
public function testSiteStatic(): void
|
||||
|
||||
Reference in New Issue
Block a user