1
0
Fork 0
mirror of synced 2024-06-28 11:10:46 +12:00

Fixed tests

This commit is contained in:
Eldad Fux 2020-10-14 22:39:10 +03:00
parent ca5026c16b
commit f9b6325788
3 changed files with 7 additions and 2 deletions

View file

@ -34,7 +34,7 @@ return [
'CH' => 'Швейцария',
'CL' => 'Чили',
'CN' => 'Китай',
'CI' => `Кот д'Ивоар`,
'CI' => 'Кот д\'Ивоар',
'CM' => 'Камерун',
'CD' => 'ДР Конго',
'CG' => 'Република Конго',

View file

@ -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 [

View file

@ -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);
}