function module_test_class_loading

Page callback for 'class loading' test.

This module does not have a dependency on module_autoload_test.module. If that module is enabled, this function should return the string 'Drupal\\module_autoload_test\\SomeClass::testMethod() was invoked.'. If that module is not enabled, this function should return nothing.

1 string reference to 'module_test_class_loading'
module_test_menu in drupal/core/modules/system/tests/modules/module_test/module_test.module
Implements hook_menu().

File

drupal/core/modules/system/tests/modules/module_test/module_test.module, line 145

Code

function module_test_class_loading() {
  if (class_exists('Drupal\\module_autoload_test\\SomeClass')) {
    $obj = new Drupal\module_autoload_test\SomeClass();
    return $obj
      ->testMethod();
  }
}