Projet

Général

Profil

Révision 41cc1b08

Ajouté par Assos Assos il y a presque 9 ans

Update feeds 7.x-2.0-alpha9 -> 7.x-2.0-beta1

Install lib simplepie 1.3.1

Voir les différences:

drupal7/sites/all/modules/feeds/tests/feeds_mapper_config.test
2 2

  
3 3
/**
4 4
 * @file
5
 * Test cases for Feeds mapping configuration form.
5
 * Contains FeedsMapperConfigTestCase.
6 6
 */
7 7

  
8 8
/**
9
 * Class for testing basic Feeds ajax mapping configurtaion form behavior.
9
 * Test cases for Feeds mapping configuration form.
10 10
 */
11 11
class FeedsMapperConfigTestCase extends FeedsMapperTestCase {
12

  
12 13
  public static function getInfo() {
13 14
    return array(
14 15
      'name' => 'Mapper: Config',
......
37 38
    // Click gear to get form.
38 39
    $this->drupalPostAJAX(NULL, array(), 'mapping_settings_edit_0');
39 40

  
41
    $second_callback_value = $this->randomString();
42

  
40 43
    // Set some settings.
41 44
    $edit = array(
42 45
      'config[0][settings][checkbox]' => 1,
......
44 47
      'config[0][settings][textarea]' => 'Textarea value: Didery dofffffffffffffffffffffffffffffffffffff',
45 48
      'config[0][settings][radios]' => 'option1',
46 49
      'config[0][settings][select]' => 'option4',
50
      'config[0][settings][second_value]' => $second_callback_value,
47 51
    );
48 52
    $this->drupalPostAJAX(NULL, $edit, 'mapping_settings_update_0');
53
    $this->assertText(t('* Changes made to target configuration are stored temporarily. Click Save to make your changes permanent.'));
49 54

  
50 55
    // Click Save.
51 56
    $this->drupalPost(NULL, array(), t('Save'));
......
59 64
    $this->assertText('Textarea value: Didery dofffffffffffffffffffffffffffffffffffff');
60 65
    $this->assertText('Radios value: Option 1');
61 66
    $this->assertText('Select value: Another One');
67
    $this->assertText(t('Second summary: @value', array('@value' => $second_callback_value)));
62 68

  
63 69
    // Check that settings are in db.
64 70
    $config = unserialize(db_query("SELECT config FROM {feeds_importer} WHERE id='syndication'")->fetchField());
......
69 75
    $this->assertEqual($settings['textarea'], 'Textarea value: Didery dofffffffffffffffffffffffffffffffffffff');
70 76
    $this->assertEqual($settings['radios'], 'option1');
71 77
    $this->assertEqual($settings['select'], 'option4');
72

  
78
    $this->assertEqual($settings['second_value'], $second_callback_value);
73 79

  
74 80
    // Check that form validation works.
75 81
    // Click gear to get form.
......
112 118
    $this->assertText('Checkbox inactive.');
113 119
    $this->assertText('Second mapping text');
114 120
  }
121

  
115 122
}

Formats disponibles : Unified diff