You are here

protected static function FileLinkValidationTest::getFullUrl in File Link 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/FileLinkValidationTest.php \Drupal\Tests\file_link\Kernel\FileLinkValidationTest::getFullUrl()

Provides a full URL given a path relative to file_link_test module.

Parameters

string $path: A path relative to file_link_test module.

Return value

string An absolute URL.

2 calls to FileLinkValidationTest::getFullUrl()
FileLinkValidationTest::testWithExtension in tests/src/Kernel/FileLinkValidationTest.php
Tests file_link field metadata storage with extension.
FileLinkValidationTest::testWithoutExtension in tests/src/Kernel/FileLinkValidationTest.php
Tests file_link field metadata storage without extension.

File

tests/src/Kernel/FileLinkValidationTest.php, line 97

Class

FileLinkValidationTest
Provides kernel tests for 'file_link' field type.

Namespace

Drupal\Tests\file_link\Kernel

Code

protected static function getFullUrl($path) {
  return Url::fromUri('base:/' . drupal_get_path('module', 'file_link_test') . $path, [
    'absolute' => TRUE,
  ])
    ->toString();
}