Tests: update localization tests
Rely on `mag_IN` (Magahi - INDIA) being unavailable when running localization test suites, instead of `pt_BR` that is now available from Travis build images. Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
dfc2c3353d
commit
b5c33d702a
4 changed files with 19 additions and 19 deletions
|
@ -12,8 +12,8 @@ php:
|
|||
install:
|
||||
- composer self-update
|
||||
- composer install --prefer-dist
|
||||
script:
|
||||
- locale -a
|
||||
script:
|
||||
- make clean
|
||||
- make check_permissions
|
||||
- make all_tests
|
||||
|
|
|
@ -81,12 +81,12 @@ public function testAutoLocaleMultipleFirstValid()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with multiples value, the second one is valid
|
||||
* Test autoLocale with multiples value, the second one is available
|
||||
*/
|
||||
public function testAutoLocaleMultipleSecondValid()
|
||||
public function testAutoLocaleMultipleSecondAvailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
$header = 'pt_BR,fr-fr';
|
||||
$header = 'mag_IN,fr-fr';
|
||||
autoLocale($header);
|
||||
$this->assertEquals('fr_FR.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
|
@ -106,12 +106,12 @@ public function testAutoLocaleBlank()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with an invalid value: defaults to en_US.
|
||||
* Test autoLocale with an unavailable value: defaults to en_US.
|
||||
*/
|
||||
public function testAutoLocaleInvalid()
|
||||
public function testAutoLocaleUnavailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
autoLocale('pt_BR');
|
||||
autoLocale('mag_IN');
|
||||
$this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
setlocale(LC_ALL, $current);
|
||||
|
|
|
@ -81,12 +81,12 @@ public function testAutoLocaleMultipleFirstValid()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with multiples value, the second one is valid
|
||||
* Test autoLocale with multiples value, the second one is available
|
||||
*/
|
||||
public function testAutoLocaleMultipleSecondValid()
|
||||
public function testAutoLocaleMultipleSecondAvailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
$header = 'pt_BR,fr-fr';
|
||||
$header = 'mag_IN,fr-fr';
|
||||
autoLocale($header);
|
||||
$this->assertEquals('fr_FR.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
|
@ -106,12 +106,12 @@ public function testAutoLocaleBlank()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with an invalid value: defaults to en_US.
|
||||
* Test autoLocale with an unavailable value: defaults to en_US.
|
||||
*/
|
||||
public function testAutoLocaleInvalid()
|
||||
public function testAutoLocaleUnavailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
autoLocale('pt_BR');
|
||||
autoLocale('mag_IN');
|
||||
$this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
setlocale(LC_ALL, $current);
|
||||
|
|
|
@ -81,12 +81,12 @@ public function testAutoLocaleMultipleFirstValid()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with multiples value, the second one is valid
|
||||
* Test autoLocale with multiples value, the second one is available
|
||||
*/
|
||||
public function testAutoLocaleMultipleSecondValid()
|
||||
public function testAutoLocaleMultipleSecondAvailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
$header = 'pt_BR,de-de';
|
||||
$header = 'mag_IN,de-de';
|
||||
autoLocale($header);
|
||||
$this->assertEquals('de_DE.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
|
@ -106,12 +106,12 @@ public function testAutoLocaleBlank()
|
|||
}
|
||||
|
||||
/**
|
||||
* Test autoLocale with an invalid value: defaults to en_US.
|
||||
* Test autoLocale with an unavailable value: defaults to en_US.
|
||||
*/
|
||||
public function testAutoLocaleInvalid()
|
||||
public function testAutoLocaleUnavailable()
|
||||
{
|
||||
$current = setlocale(LC_ALL, 0);
|
||||
autoLocale('pt_BR');
|
||||
autoLocale('mag_IN');
|
||||
$this->assertEquals('en_US.utf8', setlocale(LC_ALL, 0));
|
||||
|
||||
setlocale(LC_ALL, $current);
|
||||
|
|
Loading…
Reference in a new issue