You are here

function FileFieldPathsTestCase::setUp in File (Field) Paths 7

Same name and namespace in other branches
  1. 6.2 tests/filefield_paths.test \FileFieldPathsTestCase::setUp()
  2. 6 tests/filefield_paths.test \FileFieldPathsTestCase::setUp()

@inheritdoc

Overrides FileFieldTestCase::setUp

3 calls to FileFieldPathsTestCase::setUp()
FileFieldPathsPathautoCase::setUp in tests/pathauto.test
@inheritdoc
FileFieldPathsRedirectTestCase::setUp in tests/redirect.test
@inheritdoc
FileFieldPathsTransliterationCase::setUp in tests/transliteration.test
@inheritdoc
3 methods override FileFieldPathsTestCase::setUp()
FileFieldPathsPathautoCase::setUp in tests/pathauto.test
@inheritdoc
FileFieldPathsRedirectTestCase::setUp in tests/redirect.test
@inheritdoc
FileFieldPathsTransliterationCase::setUp in tests/transliteration.test
@inheritdoc

File

tests/filefield_paths.test, line 18
Tests for the File (Field) Paths module.

Class

FileFieldPathsTestCase
Class FileFieldPathsTestCase

Code

function setUp() {

  // Setup required modules.
  $modules = func_get_args();
  if (isset($modules[0]) && is_array($modules[0])) {
    $modules = $modules[0];
  }
  $modules[] = 'filefield_paths_test';
  $modules[] = 'image';
  $modules[] = 'token';
  parent::setUp($modules);

  // Include all optional dependency files.
  $dirname = dirname(__FILE__) . "/../modules";
  $includes = file_scan_directory($dirname, '/.inc$/');
  foreach (array_keys($includes) as $file) {
    require_once $file;
  }

  // Create a content type.
  $content_type = $this
    ->drupalCreateContentType();
  $this->content_type = $content_type->name;
}