public function ScaldWebTestCase::enablePrivateFileSystem in Scald: Media Management made easy 7
Enable private file system and use it.
1 call to ScaldWebTestCase::enablePrivateFileSystem()
- ScaldAtomEntityTestCase::testScaldPrivateFileSystem in tests/
scald.test - Test Scald with private file system.
File
- tests/
scald.test, line 99 - Tests for scald.module.
Class
- ScaldWebTestCase
- Defines a base class for testing the Scald module.
Code
public function enablePrivateFileSystem() {
module_enable(array(
'scald_image',
));
$web_user = $this
->drupalcreateuser(array(
'administer fields',
'administer site configuration',
'administer scald',
));
$this
->drupallogin($web_user);
$this
->drupalPost('admin/config/media/file-system', array(
'file_private_path' => 'sites/default/files/private',
), t('Save configuration'));
$this
->drupalPost('admin/structure/scald/image/fields/scald_thumbnail', array(
'field[settings][uri_scheme]' => 'private',
), t('Save settings'));
$this
->assertRaw(t('Saved %label configuration.', array(
'%label' => 'Image',
)), 'Use private file for Scald Image.');
}