Commit fc76aec9 authored by Daniel Kudwien's avatar Daniel Kudwien
Browse files

#942834 by sun: Added Profile List field type support and hardened tests.

parent 4a47c6fb
Loading
Loading
Loading
Loading
+6 −3
Changes for tests/mollom.test: 6 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -2029,6 +2029,8 @@ class MollomProfileFormsTestCase extends MollomWebTestCase {
    $this->setProtection('user_register_form', MOLLOM_MODE_ANALYSIS);
    $this->drupalLogout();

    // Test each supported field separately.
    foreach ($fields as $key => $field) {
      $this->drupalGet('user/register');
      $this->assertNoCaptchaField();

@@ -2036,11 +2038,12 @@ class MollomProfileFormsTestCase extends MollomWebTestCase {
      $edit = array(
        'name' => $name,
        'mail' => $name . '@example.com',
        $key => $field['type'] != 'url' ? 'unsure' : 'http://example.com/unsure',
      );
    foreach ($fields as $key => $field) {
      $edit[$key] = ($field['type'] != 'url' ? 'unsure' : 'http://example.com/unsure');
    }
      $this->drupalPost(NULL, $edit, t('Create new account'));
      $this->assertCaptchaField();
    }

    $this->postCorrectCaptcha(NULL, array(), t('Create new account'));
    $this->assertText(t('A welcome message with further instructions has been sent to your e-mail address.'));
    $this->assertTrue(user_load_by_name($name), t('New user was found in database.'));