function ViewsUIWizardJumpMenuTestCase::createFileAndGetPath
Helper function to create a file and return its expected path.
File
-
tests/
views_ui.test, line 825
Class
- ViewsUIWizardJumpMenuTestCase
- Tests the ability of the wizard to create views with a jump menu style.
Code
public function createFileAndGetPath() {
$file = (object) array(
'uid' => 1,
'filename' => 'views-ui-jump-menu-test.txt',
'uri' => 'public://views-ui-jump-menu-test.txt',
'filemime' => 'text/plain',
'timestamp' => 1,
'status' => FILE_STATUS_PERMANENT,
);
file_put_contents($file->uri, 'test content');
$file = file_save($file);
return file_create_url($file->uri);
}