function MediaFileFieldTestCase::getTestFile in D7 Media 7.2
Same name and namespace in other branches
- 7.4 tests/media.test \MediaFileFieldTestCase::getTestFile()
- 7.3 tests/media.test \MediaFileFieldTestCase::getTestFile()
Retrieves a sample file of the specified type.
4 calls to MediaFileFieldTestCase::getTestFile()
- MediaElementTestCase::testMedia in tests/
media.test - Tests the media element type.
- MediaFileFieldDisplayTestCase::testNodeDisplay in tests/
media.test - Tests normal formatter display on node display.
- MediaFileFieldRevisionTestCase::testRevisions in tests/
media.test - Tests creating multiple revisions of a node and managing attached files.
- MediaFileFieldValidateTestCase::testRequired in tests/
media.test - Tests the required property on file fields.
File
- tests/
media.test, line 32 - Tests for media.module.
Class
- MediaFileFieldTestCase
- Provides methods specifically for testing Media module's field handling.
Code
function getTestFile($type_name, $size = NULL) {
// Get a file to upload.
$file = current($this
->drupalGetTestFiles($type_name, $size));
// Add a filesize property to files as would be read by file_load().
$file->filesize = filesize($file->uri);
return $file;
}