? modules/shortcut/shortcut.test
? sites/all/modules/devel
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.77
diff -u -p -r1.77 user.test
--- modules/user/user.test	14 Jan 2010 19:21:55 -0000	1.77
+++ modules/user/user.test	27 Jan 2010 17:12:17 -0000
@@ -713,6 +713,63 @@ class UserCancelTestCase extends DrupalW
   }
 }
 
+
+class UserSignatureTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'User signatures',
+      'description' => 'Assure that users can create signatures and that they appear on comments.',
+      'group' => 'User'
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+    // Enable user pictures.
+    variable_set('user_signatures', 1);
+  }
+
+  /**
+   * Do the test:
+   *  - User can create signature.
+   *  - Users' signatures are properly appended to comments.
+   *
+   * results: The image should be uploaded because ImageGDToolkit resizes the picture
+   */
+  function testUserSignature() {
+    // Create a user with a signature and log in.
+    $sig = $this->randomName(50);
+    $this->user = $this->drupalCreateUser(array('access content', 'post comments without approval', 'access comments', 'post comments'));
+    $this->drupalLogin($this->user);
+    $this->drupalPost('user/' . $this->user->uid . '/edit', array('signature' => $sig, 'mail' => '123@example.com'), t('Save'));
+
+    // @todo: this assertTrue *should* work, but for some reason it 
+    // is not registering the edits to $this->user's account. 
+    //$this->user = user_load($this->user->uid);
+    //debug($this->user);
+    //$this->assertTrue($this->user->signature == $sig, 'User created a signature.');
+
+    // Create a node to comment on.
+    $settings = array(
+      'title' => $this->randomName(32),
+      'type' => 'article',
+    );
+    $node = $this->drupalCreateNode($settings);
+
+    // Leave a comment.
+    $this->drupalGet('comment/reply/'.$node->nid);
+    $form_data = array(
+      'subject' => $this->randomString(10),
+      'comment_body[und][0][value]'  => $this->randomString(50)
+    );
+    $this->drupalPost(NULL, $form_data, t('Save'));
+    $this->assertText($sig, t('The users signature was properly appended to the comment.'));
+  }
+
+}
+
+
 class UserPictureTestCase extends DrupalWebTestCase {
   protected $user;
   protected $_directory_test;
@@ -1258,6 +1315,19 @@ class UserBlocksUnitTests extends Drupal
     $this->assertTrue(strpos($this->drupalGetContent(), $user1->name) > strpos($this->drupalGetContent(), $user2->name), t('Online users are ordered correctly.'));
   }
 
+  function testWhosNewBlock() {
+    // Generate users; one active and one blocked.
+    $user1 = $this->drupalCreateUser(array('access content'));
+    $user2 = $this->drupalCreateUser(array('access content'));
+    user_save($user2, array('status' => 0));
+
+    // Test block output.
+    $block = user_block_view('new');
+    $this->drupalSetContent($block['content']);
+    $this->assertText($user1->name, t('Active user found on "Who\'s New" list.'));
+    $this->assertNoText($user2->name, t('Blocked user not found on "Who\'s New" list.'));
+  }
+
   /**
    * Insert a user session into the {sessions} table. This function is used
    * since we cannot log in more than one user at the same time in tests.
