You are here

protected function PathautoTest::assetEntityPath in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_client/tests/src/Functional/PathautoTest.php \Drupal\Tests\entity_share_client\Functional\PathautoTest::assetEntityPath()

Helper function to test an entity path.

Parameters

string $entity_uuid: The entity UUID.

string $expected_path: The expected path.

string $message: The message.

3 calls to PathautoTest::assetEntityPath()
PathautoTest::testExposeCurrentState in modules/entity_share_client/tests/src/Functional/PathautoTest.php
Test pathauto plugin.
PathautoTest::testForceDisable in modules/entity_share_client/tests/src/Functional/PathautoTest.php
Test pathauto plugin.
PathautoTest::testForceEnable in modules/entity_share_client/tests/src/Functional/PathautoTest.php
Test pathauto plugin.

File

modules/entity_share_client/tests/src/Functional/PathautoTest.php, line 190

Class

PathautoTest
General functional test class for path field.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function assetEntityPath($entity_uuid, $expected_path, $message = '') {
  $path_auto_node = $this
    ->loadEntity('node', $entity_uuid);
  $path = $path_auto_node
    ->get('path')
    ->getValue();
  $this
    ->assertEquals($expected_path, $path[0]['alias'], $message);
}