You are here

public function ClassLoaderTest::testDrupalClassloadeRegisterDeprecation in Drupal 8

@expectedDeprecation drupal_classloader_register() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use the method ::addPsr4() of the class_loader service to register the namespace. See https://www.drupal.org/node/3035275.

See also

drupal_classloader_register()

File

core/tests/Drupal/Tests/Core/ClassLoader/ClassLoaderTest.php, line 33

Class

ClassLoaderTest
@group ClassLoader @group legacy @runTestsInSeparateProcesses

Namespace

Drupal\Tests\Core\ClassLoader

Code

public function testDrupalClassloadeRegisterDeprecation() {
  include_once $this->root . '/core/includes/bootstrap.inc';
  drupal_classloader_register('foo', 'modules/bar');
}