From f9ba755ec657685820999c1e29121727b5b8d2c2 Mon Sep 17 00:00:00 2001
From: Peter Lieverdink <me@cafuego.net>
Date: Tue, 14 Feb 2012 09:32:26 +1100
Subject: [PATCH 2/3] Add a test for the mtime field on module metadata.

---
 core/modules/simpletest/tests/module.test |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/core/modules/simpletest/tests/module.test b/core/modules/simpletest/tests/module.test
index c9601c9..be9e627 100644
--- a/core/modules/simpletest/tests/module.test
+++ b/core/modules/simpletest/tests/module.test
@@ -233,6 +233,21 @@ class ModuleUnitTest extends DrupalWebTestCase {
     $poll_before_forum = $poll_position !== FALSE && $forum_position !== FALSE && $poll_position < $forum_position;
     $this->assertTrue($php_before_poll && $poll_before_forum, t('Modules were enabled in the correct order by module_enable().'));
   }
+
+  /**
+   * Test whether the correct module metadata is returned.
+   */
+  function testMetaData() {
+    // Generate the list of available modules.
+    $files = system_rebuild_module_data();
+    // Check that the mtime field exists for the system module.
+    $this->assertTrue(!empty($files['system']->info['mtime']), t('The system.info modification time field is set.'));
+    // To allow for slow test systems, compare the system.info mtime with the
+    // mtime for this test file. They should not differ by more than an hour.
+    $this_mtime = filemtime(__FILE__);
+    $diff_mtime = abs($this_mtime - $files['system']->info['mtime']);
+    $this->assertTrue($diff_mtime < 3600, t('The system.info modification time field contains a valid recent timestamp.'));
+  }
 }
 
 /**
-- 
1.7.1


From 477ef2fd003b44b7b7a6286bbeda2ca542d19045 Mon Sep 17 00:00:00 2001
From: Peter Lieverdink <me@cafuego.net>
Date: Tue, 14 Feb 2012 09:44:51 +1100
Subject: [PATCH 3/3] Do as xjm says and fix up doc block verb and do not use t() on assertion message texts.

---
 core/modules/simpletest/tests/module.test |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/modules/simpletest/tests/module.test b/core/modules/simpletest/tests/module.test
index be9e627..ea7c8e1 100644
--- a/core/modules/simpletest/tests/module.test
+++ b/core/modules/simpletest/tests/module.test
@@ -235,18 +235,18 @@ class ModuleUnitTest extends DrupalWebTestCase {
   }
 
   /**
-   * Test whether the correct module metadata is returned.
+   * Tests whether the correct module metadata is returned.
    */
   function testMetaData() {
     // Generate the list of available modules.
     $files = system_rebuild_module_data();
     // Check that the mtime field exists for the system module.
-    $this->assertTrue(!empty($files['system']->info['mtime']), t('The system.info modification time field is set.'));
+    $this->assertTrue(!empty($files['system']->info['mtime']), 'The system.info modification time field is set.');
     // To allow for slow test systems, compare the system.info mtime with the
     // mtime for this test file. They should not differ by more than an hour.
     $this_mtime = filemtime(__FILE__);
     $diff_mtime = abs($this_mtime - $files['system']->info['mtime']);
-    $this->assertTrue($diff_mtime < 3600, t('The system.info modification time field contains a valid recent timestamp.'));
+    $this->assertTrue($diff_mtime < 3600, 'The system.info modification time field contains a valid recent timestamp.');
   }
 }
 
-- 
1.7.1

