You are here

function ImageImportTest::setUp in Image 6

Same name and namespace in other branches
  1. 7 contrib/image_import/tests/image_import.test \ImageImportTest::setUp()

File

contrib/image_import/tests/image_import.test, line 12

Class

ImageImportTest

Code

function setUp() {
  parent::setUp();

  // Set an image import patch.
  $image_import_path = file_directory_path() . '/' . $this
    ->randomName();
  file_check_directory($image_import_path, FILE_CREATE_DIRECTORY);
  $this
    ->drupalVariableSet('image_import_path', $image_import_path);

  // User to create image galleries.
  $this->web_user = $this
    ->drupalCreateUserRolePerm(array(
    'create images',
    'view original images',
    'edit own images',
    'edit any images',
    'administer image galleries',
    'import images',
  ));
  $this
    ->drupalGet('logout');
  $this
    ->drupalLoginUser($this->web_user);
}