You are here

viewport.test in Viewport 7

Tests for the Viewport module.

File

viewport.test
View source
<?php

/**
 * @file
 * Tests for the Viewport module.
 */
class ViewportPermissionsExist extends DrupalWebTestCase {

  /**
   * Sets up the required environment for the tests.
   */
  public function setUp() {
    parent::setUp('viewport');
  }

  /**
   * Returns info about the tests so simpletest module knows about them.
   */
  public function getInfo() {
    return array(
      'name' => 'Viewport module permissions.',
      'description' => 'Just checks the required permissions exist.',
      'group' => 'Viewport',
    );
  }

  /**
   * Tests that there's a permission to administer the viewport settings.
   */
  public function testPermissionsExist() {
    $perms_defined = module_invoke('viewport', 'permission');
    $this
      ->assertTrue($perms_defined['administer viewport'], t('Administer viewport permission exists'));
  }

}

Classes

Namesort descending Description
ViewportPermissionsExist @file Tests for the Viewport module.