You are here

function EntityEmbedTestBase::getTestFile in Entity Embed 7.3

Retrieves a sample file of the specified type.

2 calls to EntityEmbedTestBase::getTestFile()
FileFieldFormatterTest::setUp in ./entity_embed.test
Sets up a Drupal site for running functional and integration tests.
ImageFieldFormatterTest::setUp in ./entity_embed.test
Sets up a Drupal site for running functional and integration tests.

File

./entity_embed.test, line 79
Test integration for the entity_embed module.

Class

EntityEmbedTestBase
@file Test integration for the entity_embed module.

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;
}