diff --git a/tests/e2e/Services/Locale/LocaleBase.php b/tests/e2e/Services/Locale/LocaleBase.php index 5a3df45b2..863ab1757 100644 --- a/tests/e2e/Services/Locale/LocaleBase.php +++ b/tests/e2e/Services/Locale/LocaleBase.php @@ -183,6 +183,35 @@ trait LocaleBase return []; } + public function testGetLanguages():array + { + /** + * Test for SUCCESS + */ + $response = $this->client->call(Client::METHOD_GET, '/locale/langauges', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals($response['headers']['status-code'], 200); + $this->assertIsArray($response['body']); + $this->assertCount(184, $response['body']); + + $this->assertEquals($response['body'][0]['code'], 'aa'); + $this->assertEquals($response['body'][0]['name'], 'Afar'); + $this->assertEquals($response['body'][0]['nativeName'], 'Afar'); + + $this->assertEquals($response['body'][183]['code'], 'zu'); + $this->assertEquals($response['body'][183]['name'], 'Zulu'); + $this->assertEquals($response['body'][183]['nativeName'], 'isiZulu'); + + /** + * Test for FAILURE + */ + + return []; + } + public function testLangaugaes(): array { /**