You are here

public function FileUploadSanitizeNameEventTest::testEventFilenameFunctions in Drupal 9

Test event construction.

@dataProvider provideFilenames @covers ::__construct @covers ::getFilename

Parameters

string $filename: The filename to test

File

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

Class

FileUploadSanitizeNameEventTest
FileUploadSanitizeNameEvent tests.

Namespace

Drupal\Tests\Core\File

Code

public function testEventFilenameFunctions(string $filename) {
  $event = new FileUploadSanitizeNameEvent($filename, '');
  $this
    ->assertSame($filename, $event
    ->getFilename());
}