public function FileFieldFileExtensionsUpdateTest::testInsecureUpdatesNotAllowed in Drupal 9
Tests adding txt extension to field that allow insecure extensions.
File
- core/
modules/ file/ tests/ src/ Functional/ Update/ FileFieldFileExtensionsUpdateTest.php, line 34
Class
Namespace
Drupal\Tests\file\Functional\UpdateCode
public function testInsecureUpdatesNotAllowed() {
$this
->setAllowedExtensions('php jpg');
$this
->runUpdates();
$this
->assertSession()
->statusCodeEquals('200');
$field = FieldConfig::load('node.article.field_image');
$this
->assertSame('php jpg txt', $field
->getSetting('file_extensions'));
}