function FileFieldFileExtensionsUpdateTest::testInsecureUpdatesNotAllowed
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'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.