Projet

Général

Profil

Révision a192dc0b

Ajouté par Assos Assos il y a environ 8 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/feeds/tests/feeds_tests.module
209 209
 *
210 210
 * @see feeds_tests_feeds_processor_targets()
211 211
 */
212
function feeds_tests_preprocess_callback(FeedsSource $source, $target_item, $target, array &$mapping) {
212
function feeds_tests_preprocess_callback(array $target, array &$mapping) {
213 213
  $mapping['required_value'] = TRUE;
214 214
}
215 215

  
......
350 350
  }
351 351
}
352 352

  
353
/**
354
 * Implements hook_feeds_after_parse().
355
 *
356
 * Empties the list of items to import in case the test says that there are
357
 * items in there with encoding issues. These items can not be processed during
358
 * tests without having a test failure because in < PHP 5.4 that would produce
359
 * the following warning:
360
 *   htmlspecialchars(): Invalid multibyte sequence in argument
361
 *
362
 * @see FeedsCSVParserTestCase::testMbstringExtensionDisabled()
363
 */
364
function feeds_tests_feeds_after_parse(FeedsSource $source, FeedsParserResult $result) {
365
  if (variable_get('feeds_tests_feeds_after_parse_empty_items', FALSE)) {
366
    // Remove all items. No items will be processed.
367
    $result->items = array();
368
  }
369
}
370

  
353 371
/**
354 372
 * Helper class to ensure callbacks can be objects.
355 373
 */
......
360 378
 *
361 379
 * @see feeds_tests_feeds_processor_targets()
362 380
 */
363
  public static function callback(FeedsSource $source, $target_item, $target, array &$mapping) {
381
  public static function callback(array $target, array &$mapping) {
364 382
    $mapping['required_value'] = TRUE;
365 383
  }
366 384

  

Formats disponibles : Unified diff