From 39d59639e336eab959fee57f550450be7e8f2c23 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Thu, 3 May 2012 00:51:10 +0200 Subject: [PATCH] MDL-32234 Library: usergetdate tests moved to assertIdentical() (to check both type and value) --- lib/simpletest/testmoodlelib.php | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/simpletest/testmoodlelib.php b/lib/simpletest/testmoodlelib.php index 6514d65a294..1b0edab9a3d 100644 --- a/lib/simpletest/testmoodlelib.php +++ b/lib/simpletest/testmoodlelib.php @@ -573,31 +573,31 @@ class moodlelib_test extends UnitTestCase { $arr = array_values($arr); list($seconds,$minutes,$hours,$mday,$wday,$mon,$year,$yday,$weekday,$month) = $arr; - $this->assertEqual($seconds,7); - $this->assertEqual($minutes,51); - $this->assertEqual($hours,4); - $this->assertEqual($mday,23); - $this->assertEqual($wday,3); - $this->assertEqual($mon,12); - $this->assertEqual($year,2009); - $this->assertEqual($yday,356); - $this->assertEqual($weekday, 'Wednesday'); - $this->assertEqual($month, 'December'); + $this->assertIdentical($seconds, 7); + $this->assertIdentical($minutes, 51); + $this->assertIdentical($hours, 4); + $this->assertIdentical($mday, 23); + $this->assertIdentical($wday, 3); + $this->assertIdentical($mon, 12); + $this->assertIdentical($year, 2009); + $this->assertIdentical($yday, 356); + $this->assertIdentical($weekday, 'Wednesday'); + $this->assertIdentical($month, 'December'); $arr = usergetdate($ts);//gets the timezone from the $USER object $arr = array_values($arr); list($seconds,$minutes,$hours,$mday,$wday,$mon,$year,$yday,$weekday,$month) = $arr; - $this->assertEqual($seconds,7); - $this->assertEqual($minutes,51); - $this->assertEqual($hours,5); - $this->assertEqual($mday,23); - $this->assertEqual($wday,3); - $this->assertEqual($mon,12); - $this->assertEqual($year,2009); - $this->assertEqual($yday,356); - $this->assertEqual($weekday, 'Wednesday'); - $this->assertEqual($month, 'December'); + $this->assertIdentical($seconds, 7); + $this->assertIdentical($minutes, 51); + $this->assertIdentical($hours, 5); + $this->assertIdentical($mday, 23); + $this->assertIdentical($wday, 3); + $this->assertIdentical($mon, 12); + $this->assertIdentical($year, 2009); + $this->assertIdentical($yday, 356); + $this->assertIdentical($weekday, 'Wednesday'); + $this->assertIdentical($month, 'December'); //set the timezone back to what it was $USER->timezone = $userstimezone;