Permalink
Browse files

Makes the locale test not always pass, be verbose when it is skipped.

  • Loading branch information...
1 parent 05ecc7b commit 0e49a23065589aa51081ed8974dc6da7b540b9f4 @tersmitten tersmitten committed Aug 14, 2013
@@ -152,7 +152,8 @@ public function testLocalizedFloats() {
$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 @@ public function testValueQuoting() {
*/
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 @@ public function testUpdateAllWithoutForeignKey() {
*/
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(

0 comments on commit 0e49a23

Please sign in to comment.