1.20.x config_storage_obj.test public ConfigStorageTestCase::testStorageObjects()

File

modules/simpletest/tests/config_storage_obj.test, line 9

Class

ConfigStorageTestCase

Code

public function testStorageObjects() {
  global $config_directories;

  $config_directories['test-db'] = 'db://test_config';
  $config_directories['test-file'] = 'file://files/simpletest/' . $this->fileDirectoryName . '/config_test';

  $db_config = config_get_config_storage('test-db');
  $this->assertTrue(get_class($db_config) == 'ConfigDatabaseStorage', 'Created database config storage.');

  $file_config = config_get_config_storage('test-file');
  $this->assertTrue(get_class($file_config) == 'ConfigFileStorage', 'Created file config storage.');
}