You are here

mostpopular.test in Drupal Most Popular 7

Tests for the core mostpopular functionality.

File

mostpopular.test
View source
<?php

/**
 * @file
 * Tests for the core mostpopular functionality.
 */
class MostPopularTestCase extends DrupalWebTestCase {
  public function setUp() {
    parent::setUp();
  }
  public function getInfo() {
    return array(
      'name' => 'Most Popular Core',
      'description' => 'Tests most popular core functionality.',
      'group' => 'Most Popular',
    );
  }

  /**
   * Tests that when Authcache is installed and enabled, the service and
   * interval are not included in rendering the block itself.
   */
  public function testAuthCache() {
    global $is_page_authcache;
    $is_page_authcache = 1;
    $block = module_invoke('mostpopular', 'block_view', 'mostpopular');
    $compare = theme('mostpopular', array(
      'sid' => 0,
      'iid' => 0,
    ));
    $this
      ->assertEqual($block['content'], $compare);
  }

}

Classes

Namesort descending Description
MostPopularTestCase @file Tests for the core mostpopular functionality.