diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php index 9d993d4..62ffaf8 100644 --- a/core/modules/simpletest/drupal_web_test_case.php +++ b/core/modules/simpletest/drupal_web_test_case.php @@ -646,7 +646,27 @@ class DrupalUnitTestCase extends DrupalTestCase { } /** - * Sets up unit test environment. + * Returns user interface information about the test. + * + * @return + * An associative array with the following elements: + * - name: The untranslated human-readable name of the test class, which + * should describe in a few words what is being tested. + * - description: An untranslated longer description of what is being + * tested. + * - group: An untranslated human-readable name of a group to put the tests + * in, normally the name of the module or API that is being tested. + */ + public static function getInfo() { + return array( + 'name' => 'Sample functionality', + 'description' => 'Longer description of the tested functionality', + 'group' => 'Sample group', + ); + } + + /** + * Sets up the unit test environment. * * Unlike DrupalWebTestCase::setUp(), DrupalUnitTestCase::setUp() does not * install modules because tests are performed without accessing the database. @@ -693,6 +713,9 @@ class DrupalUnitTestCase extends DrupalTestCase { } } + /** + * Cleans up the unit testing environment after tests have run. + */ protected function tearDown() { global $conf; @@ -1218,6 +1241,28 @@ class DrupalWebTestCase extends DrupalTestCase { } /** + * Returns user interface information about the test. + * + * @return + * An associative array with the following elements: + * - name: The untranslated human-readable name of the test class, which + * should describe in a few words what is being tested. + * - description: An untranslated longer description of what is being + * tested. + * - group: An untranslated human-readable name of a group to put the tests + * in, normally the name of the module or API that is being tested. + */ + public static function getInfo() { + return array( + 'name' => 'Sample functionality', + 'description' => 'Longer description of the tested functionality', + 'group' => 'Sample group', + ); + } + + /** + * Sets up the testing environment. + * * Generates a random database prefix, runs the install scripts on the * prefixed database and enable the specified modules. After installation * many caches are flushed and the internal browser is setup so that the @@ -1440,8 +1485,10 @@ class DrupalWebTestCase extends DrupalTestCase { } /** - * Delete created files and temporary files directory, delete the tables created by setUp(), - * and reset the database prefix. + * Cleans up the unit testing environment after tests have run. + * + * Deletes created files and the temporary files directory, deletes the + * tables created by setUp(), and resets the database prefix. */ protected function tearDown() { global $user, $language;