You are here

gravatar.test in Gravatar integration 7

Same filename and directory in other branches
  1. 6 gravatar.test

Tests for the Gravatar module.

File

gravatar.test
View source
<?php

/**
 * @file
 * Tests for the Gravatar module.
 */

/**
 * Test basic functionality.
 */
class GravatarUnitTest extends DrupalWebTestCase {
  public static function getInfo() {
    return array(
      'name' => t('Gravatar functionality'),
      'description' => t('Test basic Gravatar functionality.'),
      'group' => t('Gravatar'),
    );
  }
  function setUp() {
    parent::setUp('gravatar', 'comment');

    // Enable user pictures.
    variable_set('user_pictures', 1);
  }
  function testGravatar() {
    $variables = array();
    $images = $this
      ->drupalGetTestFiles('image');
    $user = $this
      ->drupalCreateUser();
    $user->picture = $images[0];
    $variables['account'] = $user;
    $gravatar = gravatar_preprocess_user_picture($variables);
    $variables['account'] = $this
      ->drupalCreateNode();
    $gravatar = gravatar_preprocess_user_picture($variables);

    //$variables['account'] = comment_save()
  }
  function testNodeGravatar() {
  }
  function testCommentGravatar() {
  }

}

/**
 * Test administration functionality.
 */
class GravatarFunctionalTest extends DrupalWebTestCase {
  public static function getInfo() {
    return array(
      'name' => t('Gravatar administration'),
      'description' => t('Test Gravatar administration.'),
      'group' => t('Gravatar'),
    );
  }
  function setUp() {
    parent::setUp('gravatar');
  }

}

Classes

Namesort descending Description
GravatarFunctionalTest Test administration functionality.
GravatarUnitTest Test basic functionality.