diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-31 01:49:55 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-03-31 01:49:55 +0000 |
commit | f40532da769cd1dd551a42bec64dbb1aff240099 (patch) | |
tree | 988da5abd5f1604ea59cccea4747dc124cccfb95 /modules/simpletest | |
parent | 5cc1704a3f23cdef051fbd74bb6532f4dc3800d4 (diff) | |
download | brdo-f40532da769cd1dd551a42bec64dbb1aff240099.tar.gz brdo-f40532da769cd1dd551a42bec64dbb1aff240099.tar.bz2 |
#376129 by boombatower, Damien Tournoud, and chx: Change getInfo() to a static method to reduce memory footprint of SimpleTest.
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/simpletest.module | 31 | ||||
-rw-r--r-- | modules/simpletest/simpletest.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/actions.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/bootstrap.test | 8 | ||||
-rw-r--r-- | modules/simpletest/tests/cache.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/common.test | 24 | ||||
-rw-r--r-- | modules/simpletest/tests/database_test.test | 56 | ||||
-rw-r--r-- | modules/simpletest/tests/file.test | 38 | ||||
-rw-r--r-- | modules/simpletest/tests/form.test | 10 | ||||
-rw-r--r-- | modules/simpletest/tests/graph.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/image.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/menu.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/module.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/registry.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/schema.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/session.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/unicode.test | 2 | ||||
-rw-r--r-- | modules/simpletest/tests/xmlrpc.test | 4 |
18 files changed, 99 insertions, 102 deletions
diff --git a/modules/simpletest/simpletest.module b/modules/simpletest/simpletest.module index f0ab28fd7..efc3a1fa9 100644 --- a/modules/simpletest/simpletest.module +++ b/modules/simpletest/simpletest.module @@ -89,7 +89,7 @@ function simpletest_test_form() { $header = array(t('Message'), t('Group'), t('Filename'), t('Line'), t('Function'), array('colspan' => 2, 'data' => t('Status'))); while ($result = db_fetch_object($results)) { $class = $result->test_class; - $info = $uncategorized_tests[$class]->getInfo(); + $info = call_user_func(array($class, 'getInfo')); $group = $info['group']; $selected_tests[$group][$class] = TRUE; if (!isset($group_summary[$group])) { @@ -130,7 +130,7 @@ function simpletest_test_form() { foreach ($form['results'] as $group => &$elements) { $group_ok = TRUE; foreach ($elements as $class => &$element) { - $info = $uncategorized_tests[$class]->getInfo(); + $info = call_user_func(array($class, 'getInfo')); $ok = $element['summary']['#fail'] + $element['summary']['#exception'] == 0; $element += array( '#type' => 'fieldset', @@ -166,15 +166,13 @@ function simpletest_test_form() { $form['tests']['table'][$group_name] = array( '#collapsed' => TRUE, ); - foreach ($test_group as $test) { - $test_info = $test->getInfo(); - $test_class = get_class($test); - $is_selected = isset($selected_tests[$group_name][$test_class]); - $form['tests']['table'][$group_name][$test_class] = array( + foreach ($test_group as $class => $info) { + $is_selected = isset($selected_tests[$group_name][$class]); + $form['tests']['table'][$group_name][$class] = array( '#type' => 'checkbox', - '#title' => $test_info['name'], + '#title' => $info['name'], '#default_value' => $is_selected, - '#description' => $test_info['description'], + '#description' => $info['description'], ); if ($is_selected) { $form['tests']['table'][$group_name]['#collapsed'] = FALSE; @@ -475,18 +473,17 @@ function simpletest_get_all_tests() { include_once DRUPAL_ROOT . '/' . $file; } $classes = array_values(array_diff(get_declared_classes(), $existing_classes)); - $formatted_classes = array(); foreach ($classes as $key => $class) { - if (method_exists($class, 'getInfo')) { - $formatted_classes[$class] = new $class; + if (!method_exists($class, 'getInfo')) { + unset($classes[$key]); } } } - if (count($formatted_classes) == 0) { + if (count($classes) == 0) { drupal_set_message('No test cases found.', 'error'); return FALSE; } - return $formatted_classes; + return $classes; } /** @@ -498,9 +495,9 @@ function simpletest_get_all_tests() { */ function simpletest_categorize_tests($tests) { $groups = array(); - foreach ($tests as $test => $instance) { - $info = $instance->getInfo(); - $groups[$info['group']][$test] = $instance; + foreach ($tests as $test) { + $info = call_user_func(array($test, 'getInfo')); + $groups[$info['group']][$test] = $info; } uksort($groups, 'strnatcasecmp'); return $groups; diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test index d3934988d..58b75b181 100644 --- a/modules/simpletest/simpletest.test +++ b/modules/simpletest/simpletest.test @@ -13,7 +13,7 @@ class SimpleTestFunctionalTest extends DrupalWebTestCase { */ protected $test_ids = array(); - function getInfo() { + public static function getInfo() { return array( 'name' => t('SimpleTest functionality'), 'description' => t('Test SimpleTest\'s web interface: check that the intended tests were diff --git a/modules/simpletest/tests/actions.test b/modules/simpletest/tests/actions.test index 3965500ef..42bfaf322 100644 --- a/modules/simpletest/tests/actions.test +++ b/modules/simpletest/tests/actions.test @@ -2,7 +2,7 @@ // $Id$ class ActionsConfigurationTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Actions configuration'), 'description' => t('Tests complex actions configuration by adding, editing, and deleting a complex action.'), diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test index 3cacf1175..befc5ea53 100644 --- a/modules/simpletest/tests/bootstrap.test +++ b/modules/simpletest/tests/bootstrap.test @@ -3,7 +3,7 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('IP address and HTTP_HOST test'), 'description' => t('Get the IP address from the current visitor from the server variables, check hostname validation.'), @@ -82,7 +82,7 @@ class BootstrapIPAddressTestCase extends DrupalWebTestCase { class BootstrapPageCacheTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Page cache test'), 'description' => t('Enable the page cache and test it with conditional HTTP requests.'), @@ -136,7 +136,7 @@ class BootstrapVariableTestCase extends DrupalWebTestCase { parent::setUp('system_test'); } - function getInfo() { + public static function getInfo() { return array( 'name' => t('Variable test'), 'description' => t('Make sure the variable system functions correctly.'), @@ -182,7 +182,7 @@ class BootstrapVariableTestCase extends DrupalWebTestCase { */ class HookBootExitTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Boot and exit hook invocation'), 'description' => t('Test that hook_boot() and hook_exit() are called correctly.'), diff --git a/modules/simpletest/tests/cache.test b/modules/simpletest/tests/cache.test index 368947143..31d13c3e7 100644 --- a/modules/simpletest/tests/cache.test +++ b/modules/simpletest/tests/cache.test @@ -102,7 +102,7 @@ class CacheTestCase extends DrupalWebTestCase { } class CacheSavingCase extends CacheTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Cache saving test'), 'description' => t('Check our variables are saved and restored the right way.'), @@ -163,7 +163,7 @@ class CacheSavingCase extends CacheTestCase { } class CacheClearCase extends CacheTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Cache clear test'), 'description' => t('Check our clearing is done the proper way.'), diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 2fa9b1687..2a2af52f7 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -6,7 +6,7 @@ */ class CommonLUnitTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Tests for the l() function'), 'description' => t('Confirm that url() works correctly with various input.'), @@ -30,7 +30,7 @@ class CommonSizeTestCase extends DrupalWebTestCase { protected $exact_test_cases; protected $rounded_test_cases; - function getInfo() { + public static function getInfo() { return array( 'name' => t('Size parsing test'), 'description' => t('Parse a predefined amount of bytes and compare the output with the expected value.'), @@ -134,7 +134,7 @@ class DrupalTagsHandlingTestCase extends DrupalWebTestCase { '"Drupal, although it rhymes with sloopal, is as awesome as a troopal!"' => 'Drupal, although it rhymes with sloopal, is as awesome as a troopal!', ); - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal tags handling'), 'description' => t("Performs tests on Drupal's handling of tags, both explosion and implosion tactics used."), @@ -184,7 +184,7 @@ class DrupalTagsHandlingTestCase extends DrupalWebTestCase { * Test the Drupal CSS system. */ class CascadingStylesheetsTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Cascading stylesheets'), 'description' => t('Tests adding various cascading stylesheets to the page.'), @@ -278,7 +278,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { * Test drupal_http_request(). */ class DrupalHTTPRequestTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal HTTP request'), 'description' => t("Performs tests on Drupal's HTTP request mechanism."), @@ -359,7 +359,7 @@ class DrupalHTTPRequestTestCase extends DrupalWebTestCase { * Testing drupal_set_content and drupal_get_content. */ class DrupalSetContentTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal set/get content'), 'description' => t('Performs tests on setting and retrieiving content from theme regions.'), @@ -410,7 +410,7 @@ class JavaScriptTestCase extends DrupalWebTestCase { */ var $preprocess_js = NULL; - function getInfo() { + public static function getInfo() { return array( 'name' => t('JavaScript'), 'description' => t('Tests the JavaScript system.'), @@ -562,7 +562,7 @@ class JavaScriptTestCase extends DrupalWebTestCase { * Tests for drupal_render(). */ class DrupalRenderUnitTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal render'), 'description' => t('Performs unit tests on drupal_render().'), @@ -627,7 +627,7 @@ class DrupalRenderUnitTestCase extends DrupalWebTestCase { * Tests Drupal error and exception handlers. */ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal error handlers'), 'description' => t('Performs tests on the Drupal error and exception handler.'), @@ -739,7 +739,7 @@ class DrupalErrorHandlerUnitTest extends DrupalWebTestCase { * Test for valid_url(). */ class ValidUrlTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Valid Url'), 'description' => t("Performs tests on Drupal's valid url function."), @@ -847,7 +847,7 @@ class ValidUrlTestCase extends DrupalWebTestCase { * Tests for CRUD API functions. */ class DrupalDataApiTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Data API functions'), 'description' => t('Tests the performance of CRUD APIs.'), @@ -904,7 +904,7 @@ class DrupalErrorCollectionUnitTest extends DrupalWebTestCase { */ protected $collectedErrors = array(); - function getInfo() { + public static function getInfo() { return array( 'name' => t('SimpleTest error collecter'), 'description' => t('Performs tests on the Simpletest error and exception collecter.'), diff --git a/modules/simpletest/tests/database_test.test b/modules/simpletest/tests/database_test.test index bc9a84b3b..a59e321aa 100644 --- a/modules/simpletest/tests/database_test.test +++ b/modules/simpletest/tests/database_test.test @@ -171,7 +171,7 @@ class DatabaseTestCase extends DrupalWebTestCase { */ class DatabaseConnectionTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Connection tests'), 'description' => t('Tests of the core database system.'), @@ -239,7 +239,7 @@ class DatabaseConnectionTestCase extends DatabaseTestCase { */ class DatabaseFetchTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Fetch tests'), 'description' => t('Test the Database system\'s various fetch capabilities.'), @@ -320,7 +320,7 @@ class DatabaseFetchTestCase extends DatabaseTestCase { */ class DatabaseFetch2TestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Fetch tests, part 2'), 'description' => t('Test the Database system\'s various fetch capabilities.'), @@ -385,7 +385,7 @@ class DatabaseFetch2TestCase extends DatabaseTestCase { */ class DatabaseInsertTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Insert tests'), 'description' => t('Test the Insert query builder.'), @@ -519,7 +519,7 @@ class DatabaseInsertTestCase extends DatabaseTestCase { */ class DatabaseInsertLOBTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Insert tests, LOB fields'), 'description' => t('Test the Insert query builder with LOB fields.'), @@ -559,7 +559,7 @@ class DatabaseInsertLOBTestCase extends DatabaseTestCase { */ class DatabaseInsertDefaultsTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Insert tests, default fields'), 'description' => t('Test the Insert query builder with default values.'), @@ -612,7 +612,7 @@ class DatabaseInsertDefaultsTestCase extends DatabaseTestCase { */ class DatabaseUpdateTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Update tests'), 'description' => t('Test the Update query builder.'), @@ -683,7 +683,7 @@ class DatabaseUpdateTestCase extends DatabaseTestCase { */ class DatabaseUpdateComplexTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Update tests, Complex'), 'description' => t('Test the Update query builder, complex queries.'), @@ -804,7 +804,7 @@ class DatabaseUpdateComplexTestCase extends DatabaseTestCase { */ class DatabaseUpdateLOBTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Update tests, LOB'), 'description' => t('Test the Update query builder with LOB fields.'), @@ -856,7 +856,7 @@ class DatabaseUpdateLOBTestCase extends DatabaseTestCase { */ class DatabaseDeleteTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Delete tests'), 'description' => t('Test the Delete query builder.'), @@ -883,7 +883,7 @@ class DatabaseDeleteTestCase extends DatabaseTestCase { */ class DatabaseMergeTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Merge tests'), 'description' => t('Test the Merge query builder.'), @@ -1071,7 +1071,7 @@ class DatabaseMergeTestCase extends DatabaseTestCase { */ class DatabaseSelectTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Select tests'), 'description' => t('Test the Select query builder.'), @@ -1242,7 +1242,7 @@ class DatabaseSelectTestCase extends DatabaseTestCase { */ class DatabaseSelectSubqueryTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Select tests, subqueries'), 'description' => t('Test the Select query builder.'), @@ -1308,7 +1308,7 @@ class DatabaseSelectSubqueryTestCase extends DatabaseTestCase { */ class DatabaseSelectOrderedTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Select tests, ordered'), 'description' => t('Test the Select query builder.'), @@ -1395,7 +1395,7 @@ class DatabaseSelectOrderedTestCase extends DatabaseTestCase { */ class DatabaseSelectComplexTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Select tests, complex'), 'description' => t('Test the Select query builder with more complex queries.'), @@ -1598,7 +1598,7 @@ class DatabaseSelectComplexTestCase extends DatabaseTestCase { class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Pager query tests'), 'description' => t('Test the pager query extender.'), @@ -1678,7 +1678,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase { class DatabaseSelectTableSortDefaultTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Tablesort query tests'), 'description' => t('Test the tablesort query extender.'), @@ -1723,7 +1723,7 @@ class DatabaseSelectTableSortDefaultTestCase extends DatabaseTestCase { */ class DatabaseTaggingTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Query tagging tests'), 'description' => t('Test the tagging capabilities of the Select builder.'), @@ -1806,7 +1806,7 @@ class DatabaseTaggingTestCase extends DatabaseTestCase { */ class DatabaseAlterTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Query altering tests'), 'description' => t('Test the hook_query_alter capabilities of the Select builder.'), @@ -1890,7 +1890,7 @@ class DatabaseAlterTestCase extends DatabaseTestCase { */ class DatabaseAlter2TestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Query altering tests, part 2'), 'description' => t('Test the hook_query_alter capabilities of the Select builder.'), @@ -1952,7 +1952,7 @@ class DatabaseAlter2TestCase extends DatabaseTestCase { */ class DatabaseRegressionTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Regression tests'), 'description' => t('Regression tests cases for the database layer.'), @@ -2002,7 +2002,7 @@ class DatabaseRegressionTestCase extends DatabaseTestCase { */ class DatabaseLoggingTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Query logging'), 'description' => t('Test the query logging facility.'), @@ -2127,7 +2127,7 @@ class DatabaseLoggingTestCase extends DatabaseTestCase { * Range query tests. */ class DatabaseRangeQueryTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Range query test'), 'description' => t('Test the Range query functionality.'), @@ -2158,7 +2158,7 @@ class DatabaseRangeQueryTestCase extends DrupalWebTestCase { * Temporary query tests. */ class DatabaseTemporaryQueryTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Temporary query test'), 'description' => t('Test the temporary query functionality.'), @@ -2208,7 +2208,7 @@ class DatabaseTemporaryQueryTestCase extends DrupalWebTestCase { * database system interprets SQL syntax in an expected fashion. */ class DatabaseAnsiSyntaxTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('ANSI SQL syntax tests'), 'description' => t('Test ANSI SQL syntax interpretation.'), @@ -2249,7 +2249,7 @@ class DatabaseAnsiSyntaxTestCase extends DatabaseTestCase { * Test invalid data handling. */ class DatabaseInvalidDataTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Invalid data'), 'description' => t('Test handling of some invalid data.'), @@ -2322,7 +2322,7 @@ class DatabaseInvalidDataTestCase extends DatabaseTestCase { * Drupal-specific SQL syntax tests. */ class DatabaseQueryTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Custom query syntax tests'), 'description' => t('Test Drupal\'s extended prepared statement syntax..'), @@ -2366,7 +2366,7 @@ class DatabaseQueryTestCase extends DatabaseTestCase { */ class DatabaseTransactionTestCase extends DatabaseTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Transaction tests'), 'description' => t('Test the transaction abstraction system.'), diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test index c0dcb7ad1..302a94ed4 100644 --- a/modules/simpletest/tests/file.test +++ b/modules/simpletest/tests/file.test @@ -249,7 +249,7 @@ class FileHookTestCase extends FileTestCase { * This will run tests against the file_space_used() function. */ class FileSpaceUsedTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File space used tests'), 'description' => t('Tests the file_space_used() function.'), @@ -309,7 +309,7 @@ class FileSpaceUsedTest extends FileTestCase { * This will run tests against the file validation functions (file_validate_*). */ class FileValidatorTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File validator tests'), 'description' => t('Tests the functions used to validate uploaded files.'), @@ -467,7 +467,7 @@ class FileValidatorTest extends DrupalWebTestCase { * Tests the file_unmanaged_save_data() function. */ class FileUnmanagedSaveDataTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unmanaged file save data'), 'description' => t('Tests the unmanaged file save data function.'), @@ -511,7 +511,7 @@ class FileSaveUploadTest extends FileHookTestCase { */ var $maxFidBefore; - function getInfo() { + public static function getInfo() { return array( 'name' => t('File uploading'), 'description' => t('Tests the file uploading functions.'), @@ -639,7 +639,7 @@ class FileSaveUploadTest extends FileHookTestCase { * Directory related tests. */ class FileDirectoryTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File paths and directories'), 'description' => t('Tests operations dealing with directories.'), @@ -804,7 +804,7 @@ class FileDirectoryTest extends FileTestCase { * Tests the file_scan_directory() function. */ class FileScanDirectoryTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File scan directory'), 'description' => t('Tests the file_scan_directory() function.'), @@ -932,7 +932,7 @@ class FileScanDirectoryTest extends FileTestCase { * Deletion related tests. */ class FileUnmanagedDeleteTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unmanaged file delete'), 'description' => t('Tests the unmanaged file delete function.'), @@ -978,7 +978,7 @@ class FileUnmanagedDeleteTest extends FileTestCase { * Deletion related tests. */ class FileUnmanagedDeleteRecursiveTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unmanaged recursive file delete'), 'description' => t('Tests the unmanaged file delete recursive function.'), @@ -1055,7 +1055,7 @@ class FileUnmanagedDeleteRecursiveTest extends FileTestCase { * Unmanaged move related tests. */ class FileUnmanagedMoveTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unmanaged file moving'), 'description' => t('Tests the unmanaged file move function.'), @@ -1127,7 +1127,7 @@ class FileUnmanagedMoveTest extends FileTestCase { * Unmanaged copy related tests. */ class FileUnmanagedCopyTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unmanaged file copying'), 'description' => t('Tests the unmanaged file copy function.'), @@ -1214,7 +1214,7 @@ class FileUnmanagedCopyTest extends FileTestCase { * Deletion related tests. */ class FileDeleteTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File delete'), 'description' => t('Tests the file delete function.'), @@ -1245,7 +1245,7 @@ class FileDeleteTest extends FileHookTestCase { * Move related tests */ class FileMoveTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File moving'), 'description' => t('Tests the file move function.'), @@ -1406,7 +1406,7 @@ class FileMoveTest extends FileHookTestCase { * Copy related tests. */ class FileCopyTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File copying'), 'description' => t('Tests the file copy function.'), @@ -1552,7 +1552,7 @@ class FileCopyTest extends FileHookTestCase { * Tests the file_load() function. */ class FileLoadTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File loading'), 'description' => t('Tests the file_load() function.'), @@ -1649,7 +1649,7 @@ class FileLoadTest extends FileHookTestCase { * Tests the file_save() function. */ class FileSaveTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File saving'), 'description' => t('Tests the file_save() function.'), @@ -1705,7 +1705,7 @@ class FileSaveTest extends FileHookTestCase { * Tests the file_validate() function.. */ class FileValidateTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File validate'), 'description' => t('Tests the file_validate() function.'), @@ -1744,7 +1744,7 @@ class FileValidateTest extends FileHookTestCase { * Tests the file_save_data() function. */ class FileSaveDataTest extends FileHookTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File save data'), 'description' => t('Tests the file save data function.'), @@ -1875,7 +1875,7 @@ class FileSaveDataTest extends FileHookTestCase { * Tests for download/file transfer functions. */ class FileDownloadTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File download'), 'description' => t('Tests for file download/transfer functions.'), @@ -1921,7 +1921,7 @@ class FileDownloadTest extends FileTestCase { * Tests for file_munge_filename() and file_unmunge_filename(). */ class FileNameMungingTest extends FileTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('File naming'), 'description' => t('Test filename munging and unmunging.'), diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index be5c3117d..88b2614b9 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -8,7 +8,7 @@ class FormsTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Required field validation'), 'description' => t('Carriage returns, tabs, and spaces are not valid content for a required field.'), @@ -78,7 +78,7 @@ class FormsTestCase extends DrupalWebTestCase { * Test form type functions for expected behavior. */ class FormsTestTypeCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Form type-specific tests'), 'description' => t('Test form type functions for expected behavior.'), @@ -116,7 +116,7 @@ class FormsTestTypeCase extends DrupalWebTestCase { */ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Tableselect form element type test'), 'description' => t('Test the tableselect element for expected behavior'), @@ -320,7 +320,7 @@ class FormsElementsTableSelectFunctionalTest extends DrupalWebTestCase { */ class FormsFormCleanIdFunctionalTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('form_clean_id() test'), 'description' => t('Test the function form_clean_id() for expected behavior'), @@ -350,7 +350,7 @@ class FormsFormCleanIdFunctionalTest extends DrupalWebTestCase { */ class FormAPITestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Drupal Execute and Batch API'), 'description' => t('Tests the compatibility of drupal_execute and the Batch API'), diff --git a/modules/simpletest/tests/graph.test b/modules/simpletest/tests/graph.test index ce95ac46b..cd88c2ee2 100644 --- a/modules/simpletest/tests/graph.test +++ b/modules/simpletest/tests/graph.test @@ -10,7 +10,7 @@ * Unit tests for the graph handling features. */ class GraphUnitTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Graph'), 'description' => t('Graph handling unit tests.'), diff --git a/modules/simpletest/tests/image.test b/modules/simpletest/tests/image.test index 4be01c773..21fb97ac9 100644 --- a/modules/simpletest/tests/image.test +++ b/modules/simpletest/tests/image.test @@ -14,7 +14,7 @@ class ImageToolkitTestCase extends DrupalWebTestCase { protected $file; protected $image; - function getInfo() { + public static function getInfo() { return array( 'name' => t('Image toolkit tests'), 'description' => t('Check image tookit functions.'), @@ -203,7 +203,7 @@ class ImageToolkitGdTestCase extends DrupalWebTestCase { protected $width = 40; protected $height = 20; - function getInfo() { + public static function getInfo() { return array( 'name' => t('Image GD manipulation tests'), 'description' => t('Check that core image manipulations work properly: scale, resize, rotate, crop, scale and crop, and desaturate.'), diff --git a/modules/simpletest/tests/menu.test b/modules/simpletest/tests/menu.test index 633945cfc..882b3831f 100644 --- a/modules/simpletest/tests/menu.test +++ b/modules/simpletest/tests/menu.test @@ -7,7 +7,7 @@ */ class MenuIncTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Hook menu tests'), 'description' => t('Test menu hook functionality.'), @@ -65,7 +65,7 @@ class MenuIncTestCase extends DrupalWebTestCase { * Tests rebuilding the menu by setting 'menu_rebuild_needed.' */ class MenuRebuildTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Menu rebuild test'), 'description' => t('Test rebuilding of menu.'), diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test index ca4f7ac5e..057fc640a 100644 --- a/modules/simpletest/tests/module.test +++ b/modules/simpletest/tests/module.test @@ -10,7 +10,7 @@ * Unit tests for the module API. */ class ModuleUnitTest extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Module API'), 'description' => t('Test low-level module functions.'), diff --git a/modules/simpletest/tests/registry.test b/modules/simpletest/tests/registry.test index e8abd231b..4a859a64f 100644 --- a/modules/simpletest/tests/registry.test +++ b/modules/simpletest/tests/registry.test @@ -2,7 +2,7 @@ // $Id$ class RegistryParseFileTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Registry parse file test'), 'description' => t('Parse a simple file and check that its resources are saved to the database.'), @@ -51,7 +51,7 @@ CONTENTS; class RegistryParseFilesTestCase extends DrupalWebTestCase { protected $fileTypes = array('new', 'existing_changed'); - function getInfo() { + public static function getInfo() { return array( 'name' => t('Registry parse files test'), 'description' => t('Read two a simple files from disc, and check that their resources are saved to the database.'), diff --git a/modules/simpletest/tests/schema.test b/modules/simpletest/tests/schema.test index ed4187709..968106c34 100644 --- a/modules/simpletest/tests/schema.test +++ b/modules/simpletest/tests/schema.test @@ -10,7 +10,7 @@ * Unit tests for the Schema API. */ class SchemaTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Schema API'), 'description' => t('Tests table creation and modification via the schema API.'), diff --git a/modules/simpletest/tests/session.test b/modules/simpletest/tests/session.test index 63932e7e4..1ee80485e 100644 --- a/modules/simpletest/tests/session.test +++ b/modules/simpletest/tests/session.test @@ -7,7 +7,7 @@ */ class SessionTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('Session tests'), 'description' => t('Drupal session handling tests.'), diff --git a/modules/simpletest/tests/unicode.test b/modules/simpletest/tests/unicode.test index e2f3206be..b9eeba8d0 100644 --- a/modules/simpletest/tests/unicode.test +++ b/modules/simpletest/tests/unicode.test @@ -18,7 +18,7 @@ class UnicodeUnitTest extends DrupalWebTestCase { */ protected $extendedMode = FALSE; - function getInfo() { + public static function getInfo() { return array( 'name' => t('Unicode handling'), 'description' => t('Tests Drupal Unicode handling.'), diff --git a/modules/simpletest/tests/xmlrpc.test b/modules/simpletest/tests/xmlrpc.test index c645654b5..ce6a053d2 100644 --- a/modules/simpletest/tests/xmlrpc.test +++ b/modules/simpletest/tests/xmlrpc.test @@ -2,7 +2,7 @@ // $Id$ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('XML-RPC validator'), 'description' => t('See !validator-link.', array('!validator-link' => l('the xmlrpc validator1 specification', 'http://www.xmlrpc.com/validator1Docs'))), @@ -122,7 +122,7 @@ class XMLRPCValidator1IncTestCase extends DrupalWebTestCase { } class XMLRPCMessagesTestCase extends DrupalWebTestCase { - function getInfo() { + public static function getInfo() { return array( 'name' => t('XML-RPC message'), 'description' => t('Test large messages.'), |