/[drupal]/contributions/modules/gravatar/gravatar.test
ViewVC logotype

Contents of /contributions/modules/gravatar/gravatar.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Wed Jul 29 16:27:23 2009 UTC (3 months, 4 weeks ago) by davereid
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +68 -0 lines
File MIME type: text/x-php
by Dave Reid: Merged with 6.x and updated for 7.x.
1 <?php
2 // $Id: gravatar.test,v 1.1.2.3 2009/04/25 20:53:33 davereid Exp $
3
4 /**
5 * @file
6 * Tests for the Gravatar module.
7 */
8
9 /**
10 * Test basic functionality.
11 */
12 class GravatarUnitTest extends DrupalWebTestCase {
13 public static function getInfo() {
14 return array(
15 'name' => t('Gravatar functionality'),
16 'description' => t('Test basic Gravatar functionality.'),
17 'group' => t('Gravatar'),
18 );
19 }
20
21 function setUp() {
22 parent::setUp('gravatar', 'comment');
23
24 // Enable user pictures.
25 variable_set('user_pictures', 1);
26 }
27
28 function testGravatar() {
29 $variables = array();
30 $images = $this->drupalGetTestFiles('image');
31
32 $user = $this->drupalCreateUser();
33 $user->picture = $images[0];
34 $variables['account'] = $user;
35 $gravatar = gravatar_preprocess_user_picture($variables);
36
37 $variables['account'] = $this->drupalCreateNode();
38 $gravatar = gravatar_preprocess_user_picture($variables);
39
40 //$variables['account'] = comment_save()
41
42 }
43
44 function testNodeGravatar() {
45
46 }
47
48 function testCommentGravatar() {
49
50 }
51 }
52
53 /**
54 * Test administration functionality.
55 */
56 class GravatarFunctionalTest extends DrupalWebTestCase {
57 public static function getInfo() {
58 return array(
59 'name' => t('Gravatar administration'),
60 'description' => t('Test Gravatar administration.'),
61 'group' => t('Gravatar'),
62 );
63 }
64
65 function setUp() {
66 parent::setUp('gravatar');
67 }
68 }

  ViewVC Help
Powered by ViewVC 1.1.2