mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Makes the locale test not always pass, be verbose when it is skipped.
This commit is contained in:
parent
05ecc7bba3
commit
0e49a23065
3 changed files with 6 additions and 3 deletions
|
@ -152,7 +152,8 @@ class MysqlTest extends CakeTestCase {
|
|||
$this->skipIf(DS === '\\', 'The locale is not supported in Windows and affect the others tests.');
|
||||
|
||||
$restore = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, 'de_DE');
|
||||
|
||||
$this->skipIf(setlocale(LC_NUMERIC, 'de_DE') === false, "The German locale isn't available.");
|
||||
|
||||
$result = $this->Dbo->value(3.141593);
|
||||
$this->assertEquals('3.141593', $result);
|
||||
|
|
|
@ -340,7 +340,8 @@ class PostgresTest extends CakeTestCase {
|
|||
*/
|
||||
public function testLocalizedFloats() {
|
||||
$restore = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, 'de_DE');
|
||||
|
||||
$this->skipIf(setlocale(LC_NUMERIC, 'de_DE') === false, "The German locale isn't available.");
|
||||
|
||||
$result = $this->db->value(3.141593, 'float');
|
||||
$this->assertEquals("3.141593", $result);
|
||||
|
|
|
@ -6472,7 +6472,8 @@ class ModelWriteTest extends BaseModelTest {
|
|||
*/
|
||||
public function testWriteFloatAsGerman() {
|
||||
$restore = setlocale(LC_NUMERIC, 0);
|
||||
setlocale(LC_NUMERIC, 'de_DE');
|
||||
|
||||
$this->skipIf(setlocale(LC_NUMERIC, 'de_DE') === false, "The German locale isn't available.");
|
||||
|
||||
$model = new DataTest();
|
||||
$result = $model->save(array(
|
||||
|
|
Loading…
Add table
Reference in a new issue