function ToolbarLegacyTest::testPreRenderToolbarAdministrationTray

Tests toolbar_prerender_toolbar_administration_tray() deprecation.

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

File

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

Class

ToolbarLegacyTest
Tests Toolbar module's legacy code.

Namespace

Drupal\Tests\toolbar\Kernel

Code

public function testPreRenderToolbarAdministrationTray() {
    $render = toolbar_prerender_toolbar_administration_tray([]);
    $this->assertEquals('admin', $render['administration_menu']['#menu_name']);
}

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