function BookManagerDeprecationTest::testOptionalParametersDeprecation

@covers ::__construct

File

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

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 testOptionalParametersDeprecation() : void {
    $this->expectDeprecation('Calling BookManager::__construct() without the $backend_chained_cache argument is deprecated in drupal:9.3.0 and the $backend_chained_cache argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3039439');
    $this->expectDeprecation('Calling BookManager::__construct() without the $memory_cache argument is deprecated in drupal:9.3.0 and the $memory_cache argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3039439');
    new BookManager($this->container
        ->get('entity_type.manager'), $this->container
        ->get('string_translation'), $this->container
        ->get('config.factory'), $this->container
        ->get('book.outline_storage'), $this->container
        ->get('renderer'), $this->container
        ->get('language_manager'), $this->container
        ->get('entity.repository'));
}

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