You are here

function module_test_class_loading in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/module_test/module_test.module \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 call to module_test_class_loading()
ModuleTestController::testClassLoading in core/modules/system/tests/modules/module_test/src/Controller/ModuleTestController.php
@todo Remove module_test_class_loading().

File

core/modules/system/tests/modules/module_test/module_test.module, line 110

Code

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