You are here

protected function InlineBlockPrivateFilesTest::getFileSecret in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest::getFileSecret()

Gets the text secret for a file.

Parameters

\Drupal\file\FileInterface $file: The file entity.

Return value

string The text secret.

3 calls to InlineBlockPrivateFilesTest::getFileSecret()
InlineBlockPrivateFilesTest::assertFileAccessibleOnNode in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
Asserts a file is accessible on the page.
InlineBlockPrivateFilesTest::createPrivateFile in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
Creates a private file.
InlineBlockPrivateFilesTest::testPrivateFiles in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
Tests access to private files added to inline blocks in the layout builder.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php, line 270

Class

InlineBlockPrivateFilesTest
Test access to private files in block fields on the Layout Builder.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function getFileSecret(FileInterface $file) {
  return "The secret in {$file->label()}";
}