From 91c59dbd8e5b6cceafdcb2cf470ee49ef260494f Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 14 Jun 2011 17:07:03 +0200 Subject: [PATCH] MDL-27759 backport some improvs from master + whitespace fix --- lib/moodlelib.php | 2 +- lib/simpletest/testmoodlelib.php | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 540dd9934f8..0c6bd9da2c4 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -274,7 +274,7 @@ define('PARAM_MULTILANG', 'text'); /** * PARAM_TIMEZONE - expected timezone. Timezone can be int +-(0-13) or float +-(0.5-12.5) or - * string seperated by '/' and can have '-' &/ '_' (eg. America/North_Dakota/New_Salem + * string seperated by '/' and can have '-' &/ '_' (eg. America/North_Dakota/New_Salem * America/Port-au-Prince) */ define('PARAM_TIMEZONE', 'timezone'); diff --git a/lib/simpletest/testmoodlelib.php b/lib/simpletest/testmoodlelib.php index 6377d4b600a..25ccdbf84de 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -451,22 +451,22 @@ class moodlelib_test extends UnitTestCase { 'America/Argentina/Cordoba' => 'America/Argentina/Cordoba', 'America/Port-au-Prince' => 'America/Port-au-Prince', 'America/Argentina/Buenos_Aires' => 'America/Argentina/Buenos_Aires', - 'Wrong.Value' => '', - 'Wrong/.Value' => '', - 'Wrong(Value)' => '', - '0' => '0', - '0.0' => '0.0', - '0.5' => '0.5', - '-12.5' => '-12.5', - '+12.5' => '+12.5', - '13.5' => '', - '-13.5' => '', - '0.2' => ''); + 'PST8PDT' => 'PST8PDT', + 'Wrong.Value' => '', + 'Wrong/.Value' => '', + 'Wrong(Value)' => '', + '0' => '0', + '0.0' => '0.0', + '0.5' => '0.5', + '-12.5' => '-12.5', + '+12.5' => '+12.5', + '13.5' => '', + '-13.5' => '', + '0.2' => ''); foreach ($testvalues as $testvalue => $expectedvalue) { $actualvalue = clean_param($testvalue, PARAM_TIMEZONE); - $this->assertEqual($actualvalue, $expectedvalue, - "Expected value: {$expectedvalue} => Actual value: {$actualvalue}"); + $this->assertEqual($actualvalue, $expectedvalue); } }