Fixed tests
This commit is contained in:
parent
ca5026c16b
commit
f9b6325788
3 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue