function RouteBuilderTest::testDeprecatedConstructorArgs

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\RouteBuilderTest::testDeprecatedConstructorArgs()

Attributes

#[IgnoreDeprecations] #[AllowMockObjectsWithoutExpectations]

File

core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php, line 369

Class

RouteBuilderTest
Tests Drupal\Core\Routing\RouteBuilder.

Namespace

Drupal\Tests\Core\Routing

Code

public function testDeprecatedConstructorArgs() : void {
  $this->expectUserDeprecationMessage('Calling Drupal\\Core\\Routing\\RouteBuilder::__construct() with the module handler and controller resolver services is deprecated in drupal:11.4.0 and will be removed in drupal:12.0.0. See https://www.drupal.org/node/3324751');
  new RouteBuilder($this->dumper, $this->lock, $this->dispatcher, $this->moduleHandler, $this->controllerResolver, $this->checkProvider);
}

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