public function FileUploadSanitizeNameEventTest::testSetFilename in Drupal 9
@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());
}