Commit 1bf3a90b authored by tim.plunkett's avatar tim.plunkett
Browse files

File are now classed objects.

parent a39766ba
...@@ -768,16 +768,16 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper { ...@@ -768,16 +768,16 @@ class ViewsUIWizardJumpMenuTestCase extends ViewsUIWizardHelper {
* Helper function to create a file and return its expected path. * Helper function to create a file and return its expected path.
*/ */
function createFileAndGetPath() { function createFileAndGetPath() {
$file = (object) array( $file = entity_create('file', array(
'uid' => 1, 'uid' => 1,
'filename' => 'views-ui-jump-menu-test.txt', 'filename' => 'views-ui-jump-menu-test.txt',
'uri' => 'public://views-ui-jump-menu-test.txt', 'uri' => 'public://views-ui-jump-menu-test.txt',
'filemime' => 'text/plain', 'filemime' => 'text/plain',
'timestamp' => 1, 'timestamp' => 1,
'status' => FILE_STATUS_PERMANENT, 'status' => FILE_STATUS_PERMANENT,
); ));
file_put_contents($file->uri, 'test content'); file_put_contents($file->uri, 'test content');
$file = file_save($file); $file->save();
return file_create_url($file->uri); return file_create_url($file->uri);
} }
......
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