function ViewsSqlTest::setUp
Same name in other branches
- 7.x-3.x tests/views_query.test \ViewsSqlTest::setUp()
File
-
tests/
views_query.test, line 94
Class
Code
protected function setUp() {
parent::setUp('views', 'views_ui');
// 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',
));
drupal_install_modules(array(
'views_test',
));
drupal_get_schema('views_test', TRUE);
// Load the test dataset.
foreach ($this->dataSet() as $record) {
drupal_write_record('views_test', $record);
}
$this->checkPermissions(array(), TRUE);
}