function ViewsSqlTest::setUp

Same name in other branches
  1. 6.x-3.x tests/views_query.test \ViewsSqlTest::setUp()

Overrides DrupalWebTestCase::setUp

25 calls to ViewsSqlTest::setUp()
ViewsAccessTest::setUp in tests/views_access.test
Sets up a Drupal site for running functional and integration tests.
ViewsAjaxTest::setUp in tests/views_ajax.test
Sets up a Drupal site for running functional and integration tests.
ViewsAnalyzeTest::setUp in tests/views_analyze.test
Sets up a Drupal site for running functional and integration tests.
ViewsArgumentDefaultTest::setUp in tests/views_argument_default.test
Sets up a Drupal site for running functional and integration tests.
ViewsCloneTest::setUp in tests/views_clone.test
Sets up a Drupal site for running functional and integration tests.

... See full list

25 methods override ViewsSqlTest::setUp()
ViewsAccessTest::setUp in tests/views_access.test
Sets up a Drupal site for running functional and integration tests.
ViewsAjaxTest::setUp in tests/views_ajax.test
Sets up a Drupal site for running functional and integration tests.
ViewsAnalyzeTest::setUp in tests/views_analyze.test
Sets up a Drupal site for running functional and integration tests.
ViewsArgumentDefaultTest::setUp in tests/views_argument_default.test
Sets up a Drupal site for running functional and integration tests.
ViewsCloneTest::setUp in tests/views_clone.test
Sets up a Drupal site for running functional and integration tests.

... See full list

File

tests/views_query.test, line 183

Class

ViewsSqlTest

Code

public function setUp(array $modules = array()) {
    $modules[] = 'views';
    $modules[] = 'views_ui';
    parent::setUp($modules);
    // Define the schema and views data variable before enabling the test
    // module.
    variable_set('views_test_schema', $this->schemaDefinition());
    variable_set('views_test_views_data', $this->viewsData());
    variable_set('views_test_views_plugins', $this->viewsPlugins());
    module_enable(array(
        'views_test',
    ));
    $this->resetAll();
    // Load the test dataset.
    $data_set = $this->dataSet();
    $query = db_insert('views_test')->fields(array_keys($data_set[0]));
    foreach ($data_set as $record) {
        $query->values($record);
    }
    $query->execute();
    $this->checkPermissions(array(), TRUE);
}