You are here

public function EntityTranslationHierarchyWebTestCase::testBlockingColumnRemoved in Language Hierarchy 7

Test if translation blocking mechanism is removed on uninstall.

File

modules/entity_translation_hierarchy/tests/entity_translation_hierarchy.test, line 175
Tests for Entity Translation Hierarchy module.

Class

EntityTranslationHierarchyWebTestCase
Functional tests for entity translation.

Code

public function testBlockingColumnRemoved() {
  $this
    ->assertTrue(db_field_exists('entity_translation', 'blocking'), 'Ensure the blocking column exists on entity_translation table.');
  $this
    ->assertTrue(db_field_exists('entity_translation_revision', 'blocking'), 'Ensure the blocking column exists on entity_translation_revision table.');
  $modules = array(
    'entity_translation_hierarchy',
  );
  module_disable($modules);
  drupal_uninstall_modules($modules);
  $this
    ->assertFalse(db_field_exists('entity_translation', 'blocking'), 'Ensure the blocking column does not exist on entity_translation table after uninstall.');
  $this
    ->assertFalse(db_field_exists('entity_translation_revision', 'blocking'), 'Ensure the blocking column does not exist on entity_translation_revision table after uninstall.');
}