protected function NormalizeTest::getEntityUri

Constructs the entity URI.

Parameters

$entity: The entity.

Return value

string The entity URI.

1 call to NormalizeTest::getEntityUri()
NormalizeTest::testNormalize in drupal/core/modules/hal/lib/Drupal/hal/Tests/NormalizeTest.php
Tests the normalize function.

File

drupal/core/modules/hal/lib/Drupal/hal/Tests/NormalizeTest.php, line 174
Contains \Drupal\hal\Tests\NormalizeTest.

Class

NormalizeTest
Test the HAL normalizer.

Namespace

Drupal\hal\Tests

Code

protected function getEntityUri($entity) {
  $entity_uri_info = $entity
    ->uri();
  return url($entity_uri_info['path'], array(
    'absolute' => TRUE,
  ));
}