function FileUploadSanitizeNameEventTest::testSetFilename
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testSetFilename()
- 11.x 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 22
Class
- FileUploadSanitizeNameEventTest
- FileUploadSanitizeNameEvent tests.
Namespace
Drupal\Tests\Core\FileCode
public function testSetFilename() {
$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.