function AliasManagerTest::testGetAliasByPathException

Same name in other branches
  1. 10 core/modules/path_alias/tests/src/Unit/AliasManagerTest.php \Drupal\Tests\path_alias\Unit\AliasManagerTest::testGetAliasByPathException()

Tests the getAliasByPath method exception.

@covers ::getAliasByPath

File

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

Class

AliasManagerTest
@coversDefaultClass \Drupal\path_alias\AliasManager @group path_alias

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.