getInfo() should be declared as static (PHP errors when error_reporting includes E_STRICT)

Migrated issue

Reported by: aenw

The class function getInfo() in the .test code should be declared as a public static function. See http://drupal.org/node/325974
When php error_reporting is set to show E_STRICT errors, these errors are reported:

Strict warning: Non-static method ApiLegacyTest::getInfo() cannot be called statically in simpletest_test_get_all() (line 385 of C:\Users\ashley\Documents\dev\git\repos\drupal-6-x-core\sites\all\modules\simpletest-6.x-2.11\simpletest\simpletest.module).
Strict warning: Non-static method ApiLinkCodeTest::getInfo() cannot be called statically in simpletest_test_get_all() (line 385 of C:\Users\ashley\Documents\dev\git\repos\drupal-6-x-core\sites\all\modules\simpletest-6.x-2.11\simpletest\simpletest.module).
Strict warning: Non-static method ApiLinkDocumentationTest::getInfo() cannot be called statically in simpletest_test_get_all() (line 385 of C:\Users\ashley\Documents\dev\git\repos\drupal-6-x-core\sites\all\modules\simpletest-6.x-2.11\simpletest\simpletest.module).
Strict warning: Non-static method apiUpdateBranchPhp::getInfo() cannot be called statically in simpletest_test_get_all() (line 385 of C:\Users\ashley\Documents\dev\git\repos\drupal-6-x-core\sites\all\modules\simpletest-6.x-2.11\simpletest\simpletest.module).
Strict warning: Non-static method ApiURLPatternsTest::getInfo() cannot be called statically in simpletest_test_get_all() (line 385 of C:\Users\ashley\Documents\dev\git\repos\drupal-6-x-core\sites\all\modules\simpletest-6.x-2.11\simpletest\simpletest.module).

Files and classes affected:

  • ApiLegacyTest::getInfo() in api_legacy.test
  • ApiLinkCodeTest::getInfo() in api_link_code.test
  • ApiLinkDocumentationTest::getInfo() in api_link_documentation.test
  • apiUpdateBranchPhp::getInfo() in api_update_branch.test
  • ApiURLPatternsTest::getInfo() in api_url_patterns.test