function FileUploadSanitizeNameEventTest::testEventFilenameFunctions

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testEventFilenameFunctions()
  2. 11.x core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testEventFilenameFunctions()

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());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.