You are here

protected function FieldConfiguration::savedInActiveStore in Configuration Management 7.2

Return TRUE if all the configurations defined in configToImport were saved into the active store.

Overrides ConfigurationHandlerBaseTestCase::savedInActiveStore

File

tests/handlers/TestFieldConfiguration.test, line 97
Tests for Configuration Management: Fields.

Class

FieldConfiguration
@file Tests for Configuration Management: Fields.

Code

protected function savedInActiveStore() {
  $article = node_type_load('article');
  $config = 'field.node.body.article';
  list($component, $entity_type, $field_name, $bundle) = explode('.', $config);
  $field_exists = db_query('SELECT 1
      FROM {field_config_instance}
      WHERE
        entity_type = :entity_type AND
        field_name = :field_name AND
        bundle = :bundle', array(
    'entity_type' => $entity_type,
    'field_name' => $field_name,
    'bundle' => $bundle,
  ))
    ->fetchField();
  return $field_exists;
}