Commit de6da939 authored by catch's avatar catch

Issue #1914040 by vijaycs85: Fixed Private file system path is '0' after installation.

parent 727b07e9
......@@ -5,5 +5,5 @@ chmod:
file: '0664'
default_scheme: 'public'
path:
private: '0'
private: ''
temporary: ''
<?php
/**
* @file
* Definition of Drupal\system\Tests\File\ConfigTest.
*/
namespace Drupal\system\Tests\File;
/**
* File system configuration related tests.
*/
class ConfigTest extends FileTestBase {
public static function getInfo() {
return array(
'name' => 'File system configuration test',
'description' => 'Tests file system configuration operations',
'group' => 'File API',
);
}
function setUp(){
parent::setUp();
$this->web_user = $this->drupalCreateUser(array('administer site configuration'));
$this->drupalLogin($this->web_user);
}
/**
* Tests file configuration page.
*/
function testFileConfigurationPage() {
$this->drupalGet('admin/config/media/file-system');
// Set the file paths to non-default values.
// The respective directories are created automatically
// upon form submission.
$file_path = $this->public_files_directory;
$fields = array(
'file_public_path' => $file_path . '/file_config_page_test/public',
'file_private_path' => $file_path . '/file_config_page_test/private',
'file_temporary_path' => $file_path . '/file_config_page_test/temporary',
'file_default_scheme' => 'private',
);
// Check that all fields are present.
foreach ($fields as $field => $path) {
$this->assertFieldByName($field);
}
$this->drupalPost(NULL, $fields, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
foreach ($fields as $field => $value) {
$this->assertFieldByName($field, $value);
}
}
}
......@@ -1749,7 +1749,7 @@ function system_clear_page_cache_submit($form, &$form_state) {
* @ingroup forms
* @see system_settings_form_sumbit()
*/
function system_file_system_settings() {
function system_file_system_settings($form, $form_state) {
$config = config('system.file');
$form['file_public_path'] = array(
'#type' => 'textfield',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment