$this->
config('file.settings'
) ->
set('make_unused_managed_files_temporary', TRUE
) ->
save();
// Create the "Basic page" node type.
// @todo Remove the disabling of new revision creation in
// https://www.drupal.org/node/1239558.
$this->
drupalCreateContentType(['type' => 'page', 'name' => 'Basic page', 'new_revision' => FALSE
]);
// Create a file field on the "Basic page" node type.
$this->fieldName =
strtolower($this->
randomMachineName());
$this->
createFileField($this->fieldName, 'node', 'page'
);
// Create and log in user.
$permissions =
[ 'access administration pages',
'administer content translation',
'administer content types',
'administer languages',
'create content translations',
'create page content',
'edit any page content',
'translate any entity',