You are here

MetatagDevelTest.test in Metatag 7

Tests for the Metatag Devel module.

File

metatag_devel/tests/MetatagDevelTest.test
View source
<?php

/**
 * @file
 * Tests for the Metatag Devel module.
 */

/**
 * Tests for the Metatag Devel module.
 */
class MetatagDevelTest extends MetatagTestBase {

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Metatag Devel tests',
      'description' => 'Test the Metatag:Devel module.',
      'group' => 'Metatag',
      'dependencies' => array(
        'ctools',
        'devel',
        'token',
      ),
    );
  }

  /**
   * {@inheritdoc}
   */
  public function setUp(array $modules = array()) {
    $modules[] = 'metatag_devel';
    parent::setUp($modules);

    // Create an admin user and log them in.
    $this->adminUser = $this
      ->createAdminUser();
    $this
      ->drupalLogin($this->adminUser);
  }

  /**
   * Confirm that it's possible to load the main admin page.
   */
  public function testAdminPage() {
    $this
      ->drupalGet('admin/config/search/metatags');
    $this
      ->assertResponse(200);

    // Confirm the page is correct.
    $this
      ->assertText(t('To view a summary of the default meta tags and the inheritance, click on a meta tag type.'));
  }

}

Classes

Namesort descending Description
MetatagDevelTest Tests for the Metatag Devel module.