mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fixed tests
This commit is contained in:
@@ -34,7 +34,7 @@ return [
|
||||
'CH' => 'Швейцария',
|
||||
'CL' => 'Чили',
|
||||
'CN' => 'Китай',
|
||||
'CI' => `Кот д'Ивоар`,
|
||||
'CI' => 'Кот д\'Ивоар',
|
||||
'CM' => 'Камерун',
|
||||
'CD' => 'ДР Конго',
|
||||
'CG' => 'Република Конго',
|
||||
|
||||
@@ -236,7 +236,7 @@ class Client
|
||||
$responseHeaders['status-code'] = $responseStatus;
|
||||
|
||||
if($responseStatus === 500) {
|
||||
echo 'Server error(!): '.json_encode($responseBody)."\n";
|
||||
echo 'Server error('.$method.': '.$path.'. Params: '.json_encode($params).'): '.json_encode($responseBody)."\n";
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\E2E\Services\Locale;
|
||||
|
||||
use Exception;
|
||||
use Tests\E2E\Client;
|
||||
|
||||
trait LocaleBase
|
||||
@@ -237,6 +238,10 @@ trait LocaleBase
|
||||
'x-appwrite-locale' => $lang,
|
||||
]);
|
||||
|
||||
if(!\is_array($response['body']['countries'])) {
|
||||
throw new Exception('Failed to itterate locale: '.$lang);
|
||||
}
|
||||
|
||||
foreach ($response['body']['countries'] as $i => $code) {
|
||||
$this->assertArrayHasKey($code['code'], $defaultCountries, $code['code'] . ' country should be removed from ' . $lang);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user