- Patch #654752 by sndev, Berdir, jrbeeman: file_directory() needs to be set before module install.
parent
d91bb3a3a9
commit
c240ea574f
|
@ -1159,6 +1159,11 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||||
|
|
||||||
$this->preloadRegistry();
|
$this->preloadRegistry();
|
||||||
|
|
||||||
|
// Set path variables.
|
||||||
|
variable_set('file_public_path', $public_files_directory);
|
||||||
|
variable_set('file_private_path', $private_files_directory);
|
||||||
|
variable_set('file_temporary_path', $temp_files_directory);
|
||||||
|
|
||||||
// Include the default profile.
|
// Include the default profile.
|
||||||
variable_set('install_profile', 'standard');
|
variable_set('install_profile', 'standard');
|
||||||
$profile_details = install_profile_info('standard', 'en');
|
$profile_details = install_profile_info('standard', 'en');
|
||||||
|
@ -1213,11 +1218,6 @@ class DrupalWebTestCase extends DrupalTestCase {
|
||||||
unset($GLOBALS['conf']['language_default']);
|
unset($GLOBALS['conf']['language_default']);
|
||||||
$language = language_default();
|
$language = language_default();
|
||||||
|
|
||||||
// Set path variables
|
|
||||||
variable_set('file_public_path', $public_files_directory);
|
|
||||||
variable_set('file_private_path', $private_files_directory);
|
|
||||||
variable_set('file_temporary_path', $temp_files_directory);
|
|
||||||
|
|
||||||
// Use the test mail class instead of the default mail handler class.
|
// Use the test mail class instead of the default mail handler class.
|
||||||
variable_set('mail_system', array('default-system' => 'TestingMailSystem'));
|
variable_set('mail_system', array('default-system' => 'TestingMailSystem'));
|
||||||
|
|
||||||
|
|
|
@ -415,6 +415,26 @@ class SimpleTestMailCaptureTestCase extends DrupalWebTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test Folder creation
|
||||||
|
*/
|
||||||
|
class SimpleTestFolderTestCase extends DrupalWebTestCase {
|
||||||
|
public static function getInfo() {
|
||||||
|
return array(
|
||||||
|
'name' => 'Testing SimpleTest setUp',
|
||||||
|
'description' => "This test will check SimpleTest's treatment of hook_install during setUp. Image module is used for test.",
|
||||||
|
'group' => 'SimpleTest',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function testFolderSetup() {
|
||||||
|
if (module_exists('image')) {
|
||||||
|
$path = file_directory_path() . '/styles';
|
||||||
|
$this->assertTrue(file_prepare_directory($path, FALSE), "Directory created.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test required modules for tests.
|
* Test required modules for tests.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue