function BookManagerDeprecationTest::testDrupalStaticResetDeprecation

@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 <a href="/api/drupal/core%21modules%21book%21src%21BookManager.php/class/BookManager/9" title="Defines a book manager." class="local">\Drupal\book\BookManager</a> @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);
}

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