You are here

protected function ScaldWebTestCase::getTestFile in Scald: Media Management made easy 7

Retrieves a sample file of the specified type.

6 calls to ScaldWebTestCase::getTestFile()
ScaldAtomEntityTestCase::testScaldAtomManual in tests/scald.test
Manual atom CRUD test.
ScaldAtomEntityTestCase::testScaldPrivateFileSystem in tests/scald.test
Test Scald with private file system.
ScaldBaseTestCase::testScaldCache in tests/scald.test
Test Scald caching system.
ScaldBaseTestCase::testScaldSearch in tests/scald.test
Test Scald search.
ScaldLocalizeTestCase::createAtom in tests/scald.test
Overrides ScaldWebTestCase::createAtom().

... See full list

File

tests/scald.test, line 31
Tests for scald.module.

Class

ScaldWebTestCase
Defines a base class for testing the Scald module.

Code

protected function getTestFile($type_name, $size = NULL) {

  // Get a file to upload.
  $files = $this
    ->drupalGetTestFiles($type_name, $size);
  $file = reset($files);

  // Add a filesize property to files as would be read by file_load().
  $file->filesize = filesize($file->uri);
  return $file;
}