You are here

remove_generator.test in Remove Generator META tag 7

Tests for Remove Generator.

File

remove_generator.test
View source
<?php

/**
 * @file
 * Tests for Remove Generator.
 */

/**
 * Functional tests for the Generator META tag.
 */
class RemoveGeneratorTestCase extends DrupalWebTestCase {
  public static function getInfo() {
    return array(
      'name' => 'Remove Generator',
      'description' => 'Tests removal of the Generator META tag.',
      'group' => 'Remove Generator',
    );
  }
  public function setUp() {

    // Don't load the module yet, so we can verify that the Generator META tag
    // was original present.
    parent::setUp();
    $web_user = $this
      ->drupalCreateUser(array(
      'access content',
    ));
    $this
      ->drupalLogin($web_user);
  }
  function testRemoveGenerator() {
    $this
      ->drupalGet('<front>');
    $this
      ->assertPattern('|Generator|', 'The Generator META tag is present.');
    module_enable(array(
      'remove_generator',
    ));
    $this
      ->drupalGet('<front>');
    $this
      ->assertNoPattern('|Generator|', 'This Generator META tag has been removed.');
  }

}

Classes

Namesort descending Description
RemoveGeneratorTestCase Functional tests for the Generator META tag.