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/feeds_ui/feeds_ui.test
17 17
    );
18 18
  }
19 19

  
20
  public function setUp() {
21
    parent::setUp(array('php'), array('use PHP for settings'));
22
  }
23

  
20 24
  /**
21 25
   * UI functionality tests on
22 26
   * feeds_ui_overview(),
......
111 115

  
112 116
    // @todo Refreshing/deleting feed items. Needs to live in feeds.test
113 117
  }
118

  
119
  public function testImporterImport() {
120
    $name = $this->randomString();
121
    $id = drupal_strtolower($this->randomName());
122
    $this->createImporterConfiguration($name, $id);
123
    $this->setPlugin($id, 'FeedsCSVParser');
124
    $this->setPlugin($id, 'FeedsFileFetcher');
125
    $this->setPlugin($id, 'FeedsTermProcessor');
126

  
127
    $this->setSettings($id, 'FeedsFileFetcher', array('allowed_extensions' => 'xml'));
128
    $this->setSettings($id, 'FeedsCSVParser', array('delimiter' => '|'));
129
    $this->setSettings($id, 'FeedsUserProcessor', array('skip_hash_check' => TRUE));
130

  
131
    $this->drupalGet('admin/structure/feeds/' . $id . '/export');
132

  
133
    $export = $this->xpath('//textarea[1]/text()');
134
    $export = (string) $export[0];
135

  
136
    // Delete this importer.
137
    $this->drupalPost('admin/structure/feeds/' . $id . '/delete', array(), t('Delete'));
138

  
139
    // Try to import.
140
    $this->drupalPost('admin/structure/feeds/import', array('importer' => $export), t('Import'));
141

  
142
    $this->assertText("Successfully imported the $id feeds importer.");
143

  
144
    // Check that the settings are correct.
145
    $importer = feeds_importer($id);
146
    $this->assertEqual('FeedsFileFetcher', get_class($importer->fetcher));
147
    $this->assertEqual('FeedsCSVParser', get_class($importer->parser));
148
    $this->assertEqual('FeedsTermProcessor', get_class($importer->processor));
149

  
150
    $config = $importer->fetcher->getConfig();
151
    $this->assertEqual('xml', $config['allowed_extensions']);
152

  
153
    $config = $importer->parser->getConfig();
154
    $this->assertEqual('|', $config['delimiter']);
155

  
156
    $config = $importer->processor->getConfig();
157
    $this->assertTrue($config['skip_hash_check']);
158
  }
159

  
114 160
}

Formats disponibles : Unified diff