You are here

protected function PathautoTest::assetEntityPath in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 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.

1 call to PathautoTest::assetEntityPath()
PathautoTest::testPathautoFieldEnhancer in modules/entity_share_client/tests/src/Functional/PathautoTest.php
Test Pathauto resource field enhancer plugin.

File

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

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);
  $path_auto_node
    ->delete();
}