function simpletest_classloader_register

Same name in other branches
  1. 8.9.x core/modules/simpletest/simpletest.module \simpletest_classloader_register()
4 calls to simpletest_classloader_register()
simpletest_result_form in modules/simpletest/simpletest.pages.inc
Test results form for $test_id.
simpletest_test_form_submit in modules/simpletest/simpletest.pages.inc
Run selected tests.
simpletest_test_get_all in modules/simpletest/simpletest.module
Get a list of all of the tests provided by the system.
_simpletest_batch_operation in modules/simpletest/simpletest.module
Implements callback_batch_operation().

File

modules/simpletest/simpletest.module, line 411

Code

function simpletest_classloader_register() {
    // Prevent duplicate classloader registration.
    static $first_run = TRUE;
    if (!$first_run) {
        return;
    }
    $first_run = FALSE;
    // Only register PSR-0 class loading if we are on PHP 5.3 or higher.
    if (version_compare(PHP_VERSION, '5.3') > 0) {
        spl_autoload_register('_simpletest_autoload_psr4_psr0');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.