You are here

public function BookManagerDeprecationTest::testDrupalStaticResetDeprecation in Drupal 9

@dataProvider providerTestDrupalStaticResetDeprecation

Parameters

string $method: Method to be tested.

See also

drupal_static_reset()

File

core/modules/book/tests/src/Kernel/BookManagerDeprecationTest.php, line 26

Class

BookManagerDeprecationTest
@coversDefaultClass \Drupal\book\BookManager @group legacy

Namespace

Drupal\Tests\book\Kernel

Code

public function testDrupalStaticResetDeprecation(string $method) : void {
  $this
    ->expectDeprecation("Calling drupal_static_reset() with '{$method}' as argument is deprecated in drupal:9.3.0 and is removed in drupal:10.0.0. Use \\Drupal::service('book.memory_cache')->deleteAll() instead. See https://www.drupal.org/node/3039439");
  drupal_static_reset($method);
}