function FileFieldTestCase::setUp

Overrides DrupalWebTestCase::setUp

4 calls to FileFieldTestCase::setUp()
FileFieldAnonymousSubmission::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FileManagedFileElementTestCase::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FilePrivateTestCase::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FileScanDirectory::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
4 methods override FileFieldTestCase::setUp()
FileFieldAnonymousSubmission::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FileManagedFileElementTestCase::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FilePrivateTestCase::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.
FileScanDirectory::setUp in modules/file/tests/file.test
Sets up a Drupal site for running functional and integration tests.

File

modules/file/tests/file.test, line 14

Class

FileFieldTestCase
Provides methods specifically for testing File module's field handling.

Code

function setUp() {
    // Since this is a base class for many test cases, support the same
    // flexibility that DrupalWebTestCase::setUp() has for the modules to be
    // passed in as either an array or a variable number of string arguments.
    $modules = func_get_args();
    if (isset($modules[0]) && is_array($modules[0])) {
        $modules = $modules[0];
    }
    $modules[] = 'file';
    $modules[] = 'file_module_test';
    parent::setUp($modules);
    $this->admin_user = $this->drupalCreateUser(array(
        'access content',
        'access administration pages',
        'administer site configuration',
        'administer users',
        'administer permissions',
        'administer content types',
        'administer nodes',
        'bypass node access',
        'administer fields',
    ));
    $this->drupalLogin($this->admin_user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.