You are here

public function FileUploadSanitizeNameEventTest::provideFilenames in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::provideFilenames()

Provides data for testEventFilenameFunctions().

Return value

array Arrays with original file name.

File

core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php, line 82

Class

FileUploadSanitizeNameEventTest
FileUploadSanitizeNameEvent tests.

Namespace

Drupal\Tests\Core\File

Code

public function provideFilenames() {
  return [
    'ASCII filename with extension' => [
      'example.txt',
    ],
    'ASCII filename with complex extension' => [
      'example.html.twig',
    ],
    'ASCII filename with lots of dots' => [
      'dotty.....txt',
    ],
    'Unicode filename with extension' => [
      'Ä Ö Ü Å Ø äöüåøhello.txt',
    ],
    'Unicode filename without extension' => [
      'Ä Ö Ü Å Ø äöüåøhello',
    ],
  ];
}