Sets up Drupal unit test environment.
Overrides DrupalUnitTestBase::setUp
DrupalUnitTestBase::$modules
DrupalUnitTestBase
function setUp() {
parent::setUp();
$schema['config'] = array(
'description' => 'Database storage for the configuration system.',
'fields' => array(
'name' => array(
'description' => 'The identifier for the configuration entry, such as module.example (the name of the file, minus the file extension).',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'data' => array(
'description' => 'The raw data for this configuration entry.',
'type' => 'blob',
'not null' => TRUE,
'size' => 'big',
'translatable' => TRUE,
),
),
'primary key' => array(
'name',
),
);
db_create_table('config', $schema['config']);
$this->storage = new DatabaseStorage($this->container
->get('database'), 'config');
$this->invalidStorage = new DatabaseStorage($this->container
->get('database'), 'invalid');
// ::listAll() verifications require other configuration data to exist.
$this->storage
->write('system.performance', array());
}