You are here

protected static function FileLinkValidationTest::getViolationMessage 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::getViolationMessage()

Provides the violation message for the URl returned by ::getFullUrl().

Parameters

$message: Error message.

string $path: A path relative to file_link_test module.

Return value

string The translated violation message.

1 call to FileLinkValidationTest::getViolationMessage()
FileLinkValidationTest::testWithExtension in tests/src/Kernel/FileLinkValidationTest.php
Tests file_link field metadata storage with extension.

File

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

Class

FileLinkValidationTest
Provides kernel tests for 'file_link' field type.

Namespace

Drupal\Tests\file_link\Kernel

Code

protected static function getViolationMessage($message, $path) {
  return (new TranslatableMarkup($message, [
    '@uri' => static::getFullUrl($path),
  ]))
    ->__toString();
}