add e2e tests for locale/languages
This commit is contained in:
parent
65f63bb769
commit
d01373d8d4
|
@ -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
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue