You are here

function EncryptConfigTest::testConfigInstall in Encrypt 7.3

Same name and namespace in other branches
  1. 7.2 encrypt.test \EncryptConfigTest::testConfigInstall()

Test that the configuration table was created on install.

The table should exist and a default configuration should have been added.

File

./encrypt.test, line 254
Tests for encrypt.module

Class

EncryptConfigTest
Test configurations.

Code

function testConfigInstall() {

  // Test that the encrypt_config table was created.
  $this
    ->assertTrue(db_table_exists('encrypt_config'), 'The table for storing configurations was created.');

  // Test that the default configuration was added and is enabled.
  $default_config = encrypt_get_default_config();
  $this
    ->assertTrue($default_config['name'] == 'default', 'A default configuration was added.');
  $this
    ->assertTrue($default_config['enabled'], 'The default configuration is enabled.');
}