function UrlGeneratorTest::testDeprecatedMethods

Tests deprecated methods.

@group legacy

File

core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php, line 476

Class

UrlGeneratorTest
Confirm that the UrlGenerator is functioning properly.

Namespace

Drupal\Tests\Core\Routing

Code

public function testDeprecatedMethods() : void {
  $this->expectDeprecation('Drupal\\Core\\Routing\\UrlGenerator::getRouteDebugMessage() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use the route name instead. See https://www.drupal.org/node/3172303');
  $this->assertSame('test', $this->generator
    ->getRouteDebugMessage('test'));
  $this->expectDeprecation('Drupal\\Core\\Routing\\UrlGenerator::supports() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Only string route names are supported. See https://www.drupal.org/node/3172303');
  $this->assertTrue($this->generator
    ->supports('test'));
}

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