function AliasManagerTest::testGetAliasByPathException

Tests the getAliasByPath method exception.

@legacy-covers ::getAliasByPath

File

core/modules/path_alias/tests/src/Unit/AliasManagerTest.php, line 212

Class

AliasManagerTest
Tests Drupal\path_alias\AliasManager.

Namespace

Drupal\Tests\path_alias\Unit

Code

public function testGetAliasByPathException() : void {
  $this->expectException(\InvalidArgumentException::class);
  $this->aliasManager
    ->getAliasByPath('no-leading-slash-here');
}

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