function ToolbarLegacyTest::testDoGetRenderedSubtrees

Tests _toolbar_do_get_rendered_subtrees() deprecation.

@expectedDeprecation _toolbar_do_get_rendered_subtrees() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use Drupal\toolbar\Controller\ToolbarController::preRenderGetRenderedSubtrees() instead. See https://www.drupal.org/node/2966725

File

core/modules/toolbar/tests/src/Kernel/ToolbarLegacyTest.php, line 45

Class

ToolbarLegacyTest
Tests Toolbar module's legacy code.

Namespace

Drupal\Tests\toolbar\Kernel

Code

public function testDoGetRenderedSubtrees() {
    $render = _toolbar_do_get_rendered_subtrees([]);
    $this->assertEquals([
        'front' => '',
    ], $render['#subtrees']);
}

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