function ModuleDeprecationTest::testFirstFunctionScanStopDeprecation

Tests the deprecation is emitted when the first function stops the scan.

Attributes

#[IgnoreDeprecations]

File

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

Class

ModuleDeprecationTest
Tests module file extension deprecations.

Namespace

Drupal\Tests\system\Kernel\Module

Code

public function testFirstFunctionScanStopDeprecation() : void {
  $this->expectUserDeprecationMessage('Code in test_module_scan_stop_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');
  \Drupal::service('module_installer')->install([
    'test_module_scan_stop_deprecation',
  ]);
}

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