? clock-tests.patch Index: CHANGELOG.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/clock/CHANGELOG.txt,v retrieving revision 1.12 diff -u -p -r1.12 CHANGELOG.txt --- CHANGELOG.txt 7 Oct 2010 17:27:13 -0000 1.12 +++ CHANGELOG.txt 7 Oct 2010 18:47:42 -0000 @@ -1,7 +1,8 @@ -// $Id: CHANGELOG.txt,v 1.12 2010/10/07 17:27:13 tstoeckler Exp $ +// $Id: CHANGELOG.txt,v 1.7.2.5 2010/10/07 18:46:29 tstoeckler Exp $ Clock 7.x-1.x-dev ---------------------- +- #934980: Fix tests and use testing profile. - #853000: General clean-up, remove t() from test file, refactor to only use three variables, consistent variable naming. - #706602: Initial port to Drupal 7. Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/clock/README.txt,v retrieving revision 1.4 diff -u -p -r1.4 README.txt --- README.txt 21 Sep 2010 22:23:24 -0000 1.4 +++ README.txt 7 Oct 2010 18:47:42 -0000 @@ -1,4 +1,4 @@ -; $Id: README.txt,v 1.4 2010/09/21 22:23:24 tstoeckler Exp $ +; $Id: README.txt,v 1.1.4.6 2010/10/07 18:46:29 tstoeckler Exp $ /** * Installation Index: clock.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/clock/clock.info,v retrieving revision 1.9 diff -u -p -r1.9 clock.info --- clock.info 21 Sep 2010 22:23:24 -0000 1.9 +++ clock.info 7 Oct 2010 18:47:42 -0000 @@ -1,4 +1,4 @@ -; $Id: clock.info,v 1.9 2010/09/21 22:23:24 tstoeckler Exp $ +; $Id: clock.info,v 1.5.2.4 2010/10/07 18:46:30 tstoeckler Exp $ name = Clock description = Provides a block displaying the current time. core = 7.x Index: clock.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/clock/clock.install,v retrieving revision 1.8 diff -u -p -r1.8 clock.install --- clock.install 27 Jul 2010 20:41:23 -0000 1.8 +++ clock.install 7 Oct 2010 18:47:42 -0000 @@ -1,5 +1,5 @@ array( 'variables' => array( - 'time_zone' => 'UTC', + 'time_zone' => 'NULL', 'date_format' => '', 'update' => 1, ), Index: clock.test =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/clock/clock.test,v retrieving revision 1.8 diff -u -p -r1.8 clock.test --- clock.test 27 Jul 2010 15:53:59 -0000 1.8 +++ clock.test 7 Oct 2010 18:47:42 -0000 @@ -1,5 +1,5 @@ uid); $this->drupalLogin($privileged_user); - // Enable the clock block in main content area in the Seven theme. + // Enable the clock block (and the main content block) in main content area. + $theme = variable_get('theme_default', ''); $edit = array(); - $edit['clock_clock[region]'] = 'content'; - $this->drupalPost('admin/structure/block/list/seven', $edit, 'Save blocks'); + $edit['blocks[clock_clock][region]'] = 'content'; + $edit['blocks[system_main][region]'] = 'content'; + $this->drupalPost("admin/structure/block/list/$theme", $edit, 'Save blocks'); } public function testClockBlock() { @@ -33,7 +36,7 @@ class ClockBlockTestCase extends DrupalW global $language; // Test the default display of the clock. - $clock = date_format_date(date_now(variable_get('date_default_timezone', NULL)), 'long'); + $clock = date_format_date(date_now(variable_get('date_default_timezone', 'UTC')), 'long'); $this->assertText($clock, 'Ensure that the clock is correctly displayed by default.'); $edit = array(); $edit['time_zone_type'] = 3; @@ -58,7 +61,7 @@ class ClockBlockTestCase extends DrupalW $edit['time_zone_type'] = 4; $edit['time_zone_custom'] = 'Africa/Lubumbashi'; $this->drupalPost('admin/structure/block/manage/clock/clock/configure', $edit, 'Save block'); - $clock = date_format_date(date_now('Africa/Timbuktu'), 'long'); + $clock = date_format_date(date_now('Africa/Lubumbashi'), 'long'); $this->assertText($clock, 'Ensure that the clock is correctly displayed in a custom date format'); // Create a custom date type. @@ -77,6 +80,7 @@ class ClockBlockTestCase extends DrupalW 'locked' => FALSE, )); // Make the date format the default for the new date type. + include_once DRUPAL_ROOT . '/includes/locale.inc'; locale_date_format_save($language->language, $date_type, $date_format); // Test all date types (including the custom one). foreach (system_get_date_types() as $type => $info) {