function ModuleDeprecationTest::testModuleExtensionDeprecation

Tests that .module deprecations are emitted.

Attributes

#[IgnoreDeprecations]

File

core/modules/system/tests/src/Kernel/Module/ModuleDeprecationTest.php, line 22

Class

ModuleDeprecationTest
Tests module file extension deprecations.

Namespace

Drupal\Tests\system\Kernel\Module

Code

public function testModuleExtensionDeprecation() : void {
  \Drupal::service('module_installer')->install([
    'test_module_discovery_deprecation',
  ]);
  $this->expectUserDeprecationMessage('Code in test_module_discovery_deprecation.module is deprecated in drupal:11.5.0 and must be converted before drupal:13.0.0. Use classes instead. See https://www.drupal.org/node/3619765');
}

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