You are here

function AcquiaSearchTest::testDefaultBlocksEnable in Acquia Search 6

File

tests/acquia_search.test, line 42

Class

AcquiaSearchTest

Code

function testDefaultBlocksEnable() {
  require_once drupal_get_path('module', 'acquia_search') . '/acquia_search.install';
  $themes_regions = array(
    'garland' => 'left',
    'acquia_marina' => 'sidebar_first',
    'madeuptheme' => null,
  );
  foreach ($themes_regions as $theme => $expected_region) {
    if ($theme == 'madeuptheme') {
      $block_regions = array(
        'something',
        'or',
        'theother',
      );
    }
    else {
      $block_regions = array_keys(system_region_list($theme));
    }
    $region = _acquia_search_find_block_region($block_regions);
    $this
      ->assertEqual($region, $expected_region);
  }
  $facets = _acquia_search_get_default_facets();
  $this
    ->assertNotEqual($facets, array());
}