public function FileUploadSanitizeNameEventTest::testConstructorException in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php \Drupal\Tests\Core\File\FileUploadSanitizeNameEventTest::testConstructorException()
@covers ::__construct @covers ::setFilename
File
- core/
tests/ Drupal/ Tests/ Core/ File/ FileUploadSanitizeNameEventTest.php, line 44
Class
- FileUploadSanitizeNameEventTest
- FileUploadSanitizeNameEvent tests.
Namespace
Drupal\Tests\Core\FileCode
public function testConstructorException() {
$this
->expectException(\InvalidArgumentException::class);
$this
->expectExceptionMessage('$filename must be a filename with no path information, "bar/foo.txt" provided');
new FileUploadSanitizeNameEvent('bar/foo.txt', '');
}