Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -0,0 +1,5 @@
name: 'Migrate events test'
type: module
package: Testing
version: VERSION
core: 8.x

View file

@ -0,0 +1,44 @@
<?php
/**
* @file
* Contains \Drupal\migrate_events_test\Plugin\migrate\destination\DummyDestination.
*/
namespace Drupal\migrate_events_test\Plugin\migrate\destination;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
use Drupal\migrate\Row;
/**
* @MigrateDestination(
* id = "dummy",
* requirements_met = true
* )
*/
class DummyDestination extends DestinationBase {
/**
* {@inheritdoc}
*/
public function getIds() {
$ids['value']['type'] = 'string';
return $ids;
}
/**
* {@inheritdoc}
*/
public function fields(MigrationInterface $migration = NULL) {
return ['value' => 'Dummy value'];
}
/**
* {@inheritdoc}
*/
public function import(Row $row, array $old_destination_id_values = array()) {
return ['value' => $row->getDestinationProperty('value')];
}
}

View file

@ -0,0 +1,6 @@
name: 'Migrate module prepareRow tests'
type: module
description: 'Support module for source plugin prepareRow testing.'
package: Testing
version: VERSION
core: 8.x

View file

@ -0,0 +1,26 @@
<?php
/**
* @file
* Test module for testing the migration source plugin prepareRow() exception
* handling.
*/
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\MigrateSkipRowException;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Row;
/**
* Implements hook_migrate_prepare_row().
*/
function migrate_prepare_row_test_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
// Test both options for save_to_map.
$data = $row->getSourceProperty('data');
if ($data == 'skip_and_record') {
throw new MigrateSkipRowException('', TRUE);
}
elseif ($data == 'skip_and_dont_record') {
throw new MigrateSkipRowException('', FALSE);
}
}