$this->
assertDirectoryPermissions($directory, 0777, 'file_chmod_directory setting is respected.'
);
// Remove .htaccess file to then test that it gets re-created.
@
$file_system->
unlink($default_scheme . '://.htaccess'
);
$this->
assertFileDoesNotExist($default_scheme . '://.htaccess'
);
$this->container->
get('file.htaccess_writer'
)->
ensure();
$this->
assertFileExists($default_scheme . '://.htaccess'
);
// Remove .htaccess file again to test that it is re-created by a cron run.
@
$file_system->
unlink($default_scheme . '://.htaccess'
);
$this->
assertFileDoesNotExist($default_scheme . '://.htaccess'
);
system_cron();
$this->
assertFileExists($default_scheme . '://.htaccess'
);
// Verify contents of .htaccess file.
$file =
file_get_contents($default_scheme . '://.htaccess'
);
$this->
assertEquals(FileSecurity::
htaccessLines(FALSE
),
$file, 'The .htaccess file contains the proper content.'
);
} /**
* Tests the file paths of newly created files.
*/
public function testFileCreateNewFilepath() {