public function FileUploadSanitizeNameEventTest::testSetFilename in Drupal 10
Same name and namespace in other branches
- 9 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());
}