function FileUploadSanitizeNameEventTest::testSetFilename
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testSetFilename()
- 10 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testSetFilename()
@covers ::setFilename @covers ::getFilename
File
-
core/
tests/ Drupal/ Tests/ Core/ File/ FileUploadSanitizeNameEventTest.php, line 24
Class
- FileUploadSanitizeNameEventTest
- FileUploadSanitizeNameEvent tests.
Namespace
Drupal\Tests\Core\FileCode
public function testSetFilename() : void {
$event = new FileUploadSanitizeNameEvent('foo.txt', '');
$this->assertSame('foo.txt', $event->getFilename());
$event->setFilename('foo.html');
$this->assertSame('foo.html', $event->getFilename());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.