diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index d34b80d78..882c71543 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -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); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index c0cfac57f..70336ba0a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -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); diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 3562b5c24..505900e7f 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -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(