You are here

function ViewsModuleTest::testModuleTemplates in Views (for Drupal 7) 7.3

Tests the dynamic includes of templates via module feature.

File

tests/views_module.test, line 96
Definition of ViewsModuleTest.

Class

ViewsModuleTest
Tests basic functions from the Views module.

Code

function testModuleTemplates() {
  $views_status = variable_get('views_defaults', array());
  $views_status['frontpage'] = FALSE;

  // false is enabled.
  variable_set('views_defaults', $views_status);
  $existing = array();
  $type = array();
  $theme = array();
  $path = array();
  $registry = views_theme($existing, $type, $theme, $path);
  $this
    ->assertTrue(isset($registry['views_view__frontpage']));
}