<?php

/**
 * @file
 * Entity Cache module tests.
 */

/**
 * Copy of BlogTestCase.
 */
class EntityCacheBlogTestCase extends BlogTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of BlogTestCase',
      'description' => 'Copy of BlogTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of BookTestCase.
 */
class EntityCacheBookTestCase extends BookTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of BookTestCase',
      'description' => 'Copy of BookTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentAnonymous.
 */
class EntityCacheCommentAnonymous extends CommentAnonymous {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentAnonymous',
      'description' => 'Copy of CommentAnonymous',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentApprovalTest.
 */
class EntityCacheCommentApprovalTest extends CommentApprovalTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentApprovalTest',
      'description' => 'Copy of CommentApprovalTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentBlockFunctionalTest.
 */
class EntityCacheCommentBlockFunctionalTest extends CommentBlockFunctionalTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentBlockFunctionalTest',
      'description' => 'Copy of CommentBlockFunctionalTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentContentRebuild.
 */
class EntityCacheCommentContentRebuild extends CommentContentRebuild {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentContentRebuild',
      'description' => 'Copy of CommentContentRebuild',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentFieldsTest.
 */
class EntityCacheCommentFieldsTest extends CommentFieldsTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentFieldsTest',
      'description' => 'Copy of CommentFieldsTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentHelperCase.
 */
class EntityCacheCommentHelperCase extends CommentHelperCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentHelperCase',
      'description' => 'Copy of CommentHelperCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentNodeAccessTest.
 */
class EntityCacheCommentNodeAccessTest extends CommentNodeAccessTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentNodeAccessTest',
      'description' => 'Copy of CommentNodeAccessTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentPagerTest.
 */
class EntityCacheCommentPagerTest extends CommentPagerTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentPagerTest',
      'description' => 'Copy of CommentPagerTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentPreviewTest.
 */
class EntityCacheCommentPreviewTest extends CommentPreviewTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentPreviewTest',
      'description' => 'Copy of CommentPreviewTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentRSSUnitTest.
 */
class EntityCacheCommentRSSUnitTest extends CommentRSSUnitTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentRSSUnitTest',
      'description' => 'Copy of CommentRSSUnitTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of CommentTokenReplaceTestCase.
 */
class EntityCacheCommentTokenReplaceTestCase extends CommentTokenReplaceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of CommentTokenReplaceTestCase',
      'description' => 'Copy of CommentTokenReplaceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of MultiStepNodeFormBasicOptionsTest.
 */
class EntityCacheMultiStepNodeFormBasicOptionsTest extends MultiStepNodeFormBasicOptionsTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of MultiStepNodeFormBasicOptionsTest',
      'description' => 'Copy of MultiStepNodeFormBasicOptionsTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeAccessRebuildTestCase.
 */
class EntityCacheNodeAccessRebuildTestCase extends NodeAccessRebuildTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeAccessRebuildTestCase',
      'description' => 'Copy of NodeAccessRebuildTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeAccessRecordsUnitTest.
 */
class EntityCacheNodeAccessRecordsUnitTest extends NodeAccessRecordsTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeAccessRecordsTestCase',
      'description' => 'Copy of NodeAccessRecordsTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeAccessUnitTest.
 */
class EntityCacheNodeAccessUnitTest extends NodeAccessTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeAccessTestCase',
      'description' => 'Copy of NodeAccessTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeAdminTestCase.
 */
class EntityCacheNodeAdminTestCase extends NodeAdminTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeAdminTestCase',
      'description' => 'Copy of NodeAdminTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeBlockFunctionalTest.
 */
class EntityCacheNodeBlockFunctionalTest extends NodeBlockFunctionalTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeBlockFunctionalTest',
      'description' => 'Copy of NodeBlockFunctionalTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeBlockTestCase.
 */
class EntityCacheNodeBlockTestCase extends NodeBlockTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeBlockTestCase',
      'description' => 'Copy of NodeBlockTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeBuildContent.
 */
class EntityCacheNodeBuildContent extends NodeBuildContent {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeBuildContent',
      'description' => 'Copy of NodeBuildContent',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeCreationTestCase.
 */
class EntityCacheNodeCreationTestCase extends NodeCreationTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeCreationTestCase',
      'description' => 'Copy of NodeCreationTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeEntityFieldQueryAlter.
 */
class EntityCacheNodeEntityFieldQueryAlter extends NodeEntityFieldQueryAlter {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeEntityFieldQueryAlter',
      'description' => 'Copy of NodeEntityFieldQueryAlter',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeFeedTestCase.
 */
class EntityCacheNodeFeedTestCase extends NodeFeedTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeFeedTestCase',
      'description' => 'Copy of NodeFeedTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeLoadHooksTestCase.
 */
class EntityCacheNodeLoadHooksTestCase extends NodeLoadHooksTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeLoadHooksTestCase',
      'description' => 'Copy of NodeLoadHooksTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeLoadMultipleUnitTest.
 */
class EntityCacheNodeLoadMultipleUnitTest extends NodeLoadMultipleTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeLoadMultipleTestCase',
      'description' => 'Copy of NodeLoadMultipleTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodePostSettingsTestCase.
 */
class EntityCacheNodePostSettingsTestCase extends NodePostSettingsTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodePostSettingsTestCase',
      'description' => 'Copy of NodePostSettingsTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeQueryAlter.
 */
class EntityCacheNodeQueryAlter extends NodeQueryAlter {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeQueryAlter',
      'description' => 'Copy of NodeQueryAlter',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeRevisionsTestCase.
 */
class EntityCacheNodeRevisionsTestCase extends NodeRevisionsTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeRevisionsTestCase',
      'description' => 'Copy of NodeRevisionsTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeRSSContentTestCase.
 */
class EntityCacheNodeRSSContentTestCase extends NodeRSSContentTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeRSSContentTestCase',
      'description' => 'Copy of NodeRSSContentTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeSaveTestCase.
 */
class EntityCacheNodeSaveTestCase extends NodeSaveTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeSaveTestCase',
      'description' => 'Copy of NodeSaveTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeTitleTestCase.
 */
class EntityCacheNodeTitleTestCase extends NodeTitleTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeTitleTestCase',
      'description' => 'Copy of NodeTitleTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeTitleXSSTestCase.
 */
class EntityCacheNodeTitleXSSTestCase extends NodeTitleXSSTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeTitleXSSTestCase',
      'description' => 'Copy of NodeTitleXSSTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeTokenReplaceTestCase.
 */
class EntityCacheNodeTokenReplaceTestCase extends NodeTokenReplaceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeTokenReplaceTestCase',
      'description' => 'Copy of NodeTokenReplaceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeTypePersistenceTestCase.
 */
class EntityCacheNodeTypePersistenceTestCase extends NodeTypePersistenceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeTypePersistenceTestCase',
      'description' => 'Copy of NodeTypePersistenceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of NodeTypeTestCase.
 */
class EntityCacheNodeTypeTestCase extends NodeTypeTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of NodeTypeTestCase',
      'description' => 'Copy of NodeTypeTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PageEditTestCase.
 */
class EntityCachePageEditTestCase extends PageEditTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PageEditTestCase',
      'description' => 'Copy of PageEditTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }

  /**
   * {@inheritdoc}
   */
  protected function drupalPost($path, $edit, $submit, array $options = array(), array $headers = array(), $form_html_id = NULL, $extra_post = NULL) {
    $result = parent::drupalPost($path, $edit, $submit, $options, $headers, $form_html_id, $extra_post);

    // Reset the cache, to let the test pass. The problem is that the test
    // adds a new revision using ::drupalPost so the static cache in the context
    // of the test, never has the chance to react.
    if (!empty($edit['revision'])) {
      $node = $this->drupalGetNodeByTitle($edit['title']);
      $nid = $node->nid;
      entity_get_controller('node')->resetCache(array($nid));
    }

    return $result;
  }

}

/**
 * Copy of PagePreviewTestCase.
 */
class EntityCachePagePreviewTestCase extends PagePreviewTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PagePreviewTestCase',
      'description' => 'Copy of PagePreviewTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PageViewTestCase.
 */
class EntityCachePageViewTestCase extends PageViewTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PageViewTestCase',
      'description' => 'Copy of PageViewTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of SummaryLengthTestCase.
 */
class EntityCacheSummaryLengthTestCase extends SummaryLengthTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of SummaryLengthTestCase',
      'description' => 'Copy of SummaryLengthTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollBlockTestCase.
 */
class EntityCachePollBlockTestCase extends PollBlockTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollBlockTestCase',
      'description' => 'Copy of PollBlockTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollCreateTestCase.
 */
class EntityCachePollCreateTestCase extends PollCreateTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollCreateTestCase',
      'description' => 'Copy of PollCreateTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollExpirationTestCase.
 */
class EntityCachePollExpirationTestCase extends PollExpirationTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollExpirationTestCase',
      'description' => 'Copy of PollExpirationTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollJSAddChoice.
 */
class EntityCachePollJSAddChoice extends PollJSAddChoice {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollJSAddChoice',
      'description' => 'Copy of PollJSAddChoice',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollTestCase.
 */
class EntityCachePollTestCase extends PollTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollTestCase',
      'description' => 'Copy of PollTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollTokenReplaceTestCase.
 */
class EntityCachePollTokenReplaceTestCase extends PollTokenReplaceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollTokenReplaceTestCase',
      'description' => 'Copy of PollTokenReplaceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollVoteCheckHostname.
 */
class EntityCachePollVoteCheckHostname extends PollVoteCheckHostname {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollVoteCheckHostname',
      'description' => 'Copy of PollVoteCheckHostname',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of PollVoteTestCase.
 */
class EntityCachePollVoteTestCase extends PollVoteTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of PollVoteTestCase',
      'description' => 'Copy of PollVoteTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyHooksTestCase.
 */
class EntityCacheTaxonomyHooksTestCase extends TaxonomyHooksTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyHooksTestCase',
      'description' => 'Copy of TaxonomyHooksTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyLegacyTestCase.
 */
class EntityCacheTaxonomyLegacyTestCase extends TaxonomyLegacyTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyLegacyTestCase',
      'description' => 'Copy of TaxonomyLegacyTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyLoadMultipleUnitTest.
 */
class EntityCacheTaxonomyLoadMultipleUnitTest extends TaxonomyLoadMultipleTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyLoadMultipleTestCase',
      'description' => 'Copy of TaxonomyLoadMultipleTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyTermFieldTestCase.
 */
class EntityCacheTaxonomyTermFieldTestCase extends TaxonomyTermFieldTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyTermFieldTestCase',
      'description' => 'Copy of TaxonomyTermFieldTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyTermTestCase.
 */
class EntityCacheTaxonomyTermTestCase extends TaxonomyTermTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyTermTestCase',
      'description' => 'Copy of TaxonomyTermTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyTermUnitTest.
 */
class EntityCacheTaxonomyTermUnitTest extends TaxonomyTermTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyTermTestCase',
      'description' => 'Copy of TaxonomyTermTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyThemeTestCase.
 */
class EntityCacheTaxonomyThemeTestCase extends TaxonomyThemeTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyThemeTestCase',
      'description' => 'Copy of TaxonomyThemeTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyTokenReplaceTestCase.
 */
class EntityCacheTaxonomyTokenReplaceTestCase extends TaxonomyTokenReplaceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyTokenReplaceTestCase',
      'description' => 'Copy of TaxonomyTokenReplaceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyVocabularyFunctionalTest.
 */
class EntityCacheTaxonomyVocabularyFunctionalTest extends TaxonomyVocabularyFunctionalTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyVocabularyFunctionalTest',
      'description' => 'Copy of TaxonomyVocabularyFunctionalTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyVocabularyUnitTest.
 */
class EntityCacheTaxonomyVocabularyUnitTest extends TaxonomyVocabularyTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyVocabularyTestCase',
      'description' => 'Copy of TaxonomyVocabularyTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TaxonomyWebTestCase.
 */
class EntityCacheTaxonomyWebTestCase extends TaxonomyWebTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of TaxonomyWebTestCase',
      'description' => 'Copy of TaxonomyWebTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserAccountLinksUnitTests.
 */
class EntityCacheUserAccountLinksUnitTests extends UserAccountLinksUnitTests {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserAccountLinksUnitTests',
      'description' => 'Copy of UserAccountLinksUnitTests',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserAdminTestCase.
 */
class EntityCacheUserAdminTestCase extends UserAdminTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserAdminTestCase',
      'description' => 'Copy of UserAdminTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserAuthmapAssignmentTestCase.
 */
class EntityCacheUserAuthmapAssignmentTestCase extends UserAuthmapAssignmentTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserAuthmapAssignmentTestCase',
      'description' => 'Copy of UserAuthmapAssignmentTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserAutocompleteTestCase.
 */
class EntityCacheUserAutocompleteTestCase extends UserAutocompleteTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserAutocompleteTestCase',
      'description' => 'Copy of UserAutocompleteTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserBlocksUnitTests.
 */
class EntityCacheUserBlocksUnitTests extends UserBlocksUnitTests {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserBlocksUnitTests',
      'description' => 'Copy of UserBlocksUnitTests',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserCancelTestCase.
 */
class EntityCacheUserCancelTestCase extends UserCancelTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserCancelTestCase',
      'description' => 'Copy of UserCancelTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserCreateTestCase.
 */
class EntityCacheUserCreateTestCase extends UserCreateTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserCreateTestCase',
      'description' => 'Copy of UserCreateTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserEditedOwnAccountTestCase.
 */
class EntityCacheUserEditedOwnAccountTestCase extends UserEditedOwnAccountTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserEditedOwnAccountTestCase',
      'description' => 'Copy of UserEditedOwnAccountTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserEditTestCase.
 */
class EntityCacheUserEditTestCase extends UserEditTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserEditTestCase',
      'description' => 'Copy of UserEditTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserLoginTestCase.
 */
class EntityCacheUserLoginTestCase extends UserLoginTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserLoginTestCase',
      'description' => 'Copy of UserLoginTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserPermissionsTestCase.
 */
class EntityCacheUserPermissionsTestCase extends UserPermissionsTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserPermissionsTestCase',
      'description' => 'Copy of UserPermissionsTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserPictureTestCase.
 */
class EntityCacheUserPictureTestCase extends UserPictureTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserPictureTestCase',
      'description' => 'Copy of UserPictureTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserRegistrationTestCase.
 */
class EntityCacheUserRegistrationTestCase extends UserRegistrationTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserRegistrationTestCase',
      'description' => 'Copy of UserRegistrationTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserRoleAdminTestCase.
 */
class EntityCacheUserRoleAdminTestCase extends UserRoleAdminTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserRoleAdminTestCase',
      'description' => 'Copy of UserRoleAdminTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserRolesAssignmentTestCase.
 */
class EntityCacheUserRolesAssignmentTestCase extends UserRolesAssignmentTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserRolesAssignmentTestCase',
      'description' => 'Copy of UserRolesAssignmentTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserSaveTestCase.
 */
class EntityCacheUserSaveTestCase extends UserSaveTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserSaveTestCase',
      'description' => 'Copy of UserSaveTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserSignatureTestCase.
 */
class EntityCacheUserSignatureTestCase extends UserSignatureTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserSignatureTestCase',
      'description' => 'Copy of UserSignatureTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserTimeZoneFunctionalTest.
 */
class EntityCacheUserTimeZoneFunctionalTest extends UserTimeZoneFunctionalTest {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserTimeZoneFunctionalTest',
      'description' => 'Copy of UserTimeZoneFunctionalTest',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserTokenReplaceTestCase.
 */
class EntityCacheUserTokenReplaceTestCase extends UserTokenReplaceTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserTokenReplaceTestCase',
      'description' => 'Copy of UserTokenReplaceTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserUserSearchTestCase.
 */
class EntityCacheUserUserSearchTestCase extends UserUserSearchTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserUserSearchTestCase',
      'description' => 'Copy of UserUserSearchTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserValidateCurrentPassCustomForm.
 */
class EntityCacheUserValidateCurrentPassCustomForm extends UserValidateCurrentPassCustomForm {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserValidateCurrentPassCustomForm',
      'description' => 'Copy of UserValidateCurrentPassCustomForm',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of UserValidationTestCase.
 */
class EntityCacheUserValidationTestCase extends UserValidationTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Copy of UserValidationTestCase',
      'description' => 'Copy of UserValidationTestCase',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Copy of TranslationTestCase.
 */
class EntityCacheTranslationTestCase extends TranslationTestCase {
  public static function getInfo() {
    return array(
      'name' => 'Copy of TranslationTestCase',
      'description' => 'Copy of TranslationTestCase',
      'group' => 'Entity cache'
    );
  }
  function setUp() {
    parent::setup();
    module_enable(array('entitycache'));
  }
}

/**
 * Test comments on nodes.
 */
class EntityCacheCommentNodeTestCase extends DrupalWebTestCase {
  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Comment node cache',
      'description' => 'Test comments on nodes.',
      'group' => 'Entity cache',
    );
  }
  /**
   * {@inheritdoc}
   */
  function setUp() {
    parent::setup();
    module_enable(array('entitycache', 'comment'));
  }

  /**
   * Test to make sure node content is rebuilt after a comment has been deleted.
   * See http://drupal.org/node/1401480
   */
  function testCommentNodeCache() {
    // Create a node with two comments.
    $node = $this->drupalCreateNode();
    variable_set('comment_' . $node->type, TRUE);

    $comments = array();
    for ($i = 0; $i < 2; $i++) {
      $comment = (object) array(
        'cid' => NULL,
        'pid' => NULL,
        'uid' => 0,
        'nid' => $node->nid,
      );
      comment_save($comment);
      $comments[] = $comment;
    }

    // Load node object, the last comment should be referenced.
    $cid = end($comments)->cid;
    $node = node_load($node->nid, NULL, TRUE);
    $this->assertEqual($node->cid, $cid, t('Comment !cid is referenced.', array('!cid' => $cid)));
    comment_delete($cid);

    // Load node object again, the other (first) comment should be referenced.
    $node = node_load($node->nid, NULL, TRUE);
    $this->assertFalse(comment_load($cid), t('Comment !cid does not exists anymore.', array('!cid' => $cid)));
    $this->assertEqual($node->cid, reset($comments)->cid, t('Comment !cid is referenced.', array('!cid' => $node->cid)));
  }
}
