You are here

function PathfilterTestCase::getTestFile in Path Filter 6

Get a sample file of the specified type.

File

tests/pathfilter.test, line 34
Tests for Path Filter

Class

PathfilterTestCase

Code

function getTestFile($type, $size = NULL) {

  // Get a file to upload.
  $file = current($this
    ->drupalGetTestFiles($type, $size));

  // SimpleTest files incorrectly use "filename" instead of "filepath".
  $file->filepath = $file->filename;
  $file->filename = basename($file->filepath);
  $file->filesize = filesize($file->filepath);
  return $file;
}