Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -2,13 +2,13 @@
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\d6\TermSourceWithVocabularyFilterTest.
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\TermSourceWithVocabularyFilterTest.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate\d6;
namespace Drupal\Tests\taxonomy\Unit\Migrate;
/**
* Tests the Drupal 6 taxonomy term source with vocabulary filter.
* Tests the taxonomy term source with vocabulary filter.
*
* @group taxonomy
*/

View file

@ -0,0 +1,17 @@
<?php
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\TermTest.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate;
/**
* Tests taxonomy term source plugin.
*
* @group taxonomy
*/
class TermTest extends TermTestBase {
}

View file

@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\d6\TermTestBase.
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\TermTestBase.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate\d6;
namespace Drupal\Tests\taxonomy\Unit\Migrate;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
@ -14,7 +14,7 @@ use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
*/
abstract class TermTestBase extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\taxonomy\Plugin\migrate\source\d6\Term';
const PLUGIN_CLASS = 'Drupal\taxonomy\Plugin\migrate\source\Term';
protected $migrationConfiguration = array(
'id' => 'test',

View file

@ -0,0 +1,105 @@
<?php
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\d6\TermNodeTest.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate\d6;
use Drupal\taxonomy\Plugin\migrate\source\d6\TermNode;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* Tests d6_term_node source plugin.
*
* @group taxonomy
*/
class TermNodeTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = TermNode::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_term_node',
'vid' => 3,
),
);
protected $expectedResults = array(
array(
'nid' => 1,
'vid' => 1,
'type' => 'story',
'tid' => array(1, 4, 5),
),
);
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->databaseContents['term_node'] = array(
array(
'nid' => '1',
'vid' => '1',
'tid' => '1',
),
array(
'nid' => '1',
'vid' => '1',
'tid' => '4',
),
array(
'nid' => '1',
'vid' => '1',
'tid' => '5',
),
);
$this->databaseContents['node'] = array(
array(
'nid' => '1',
'vid' => '1',
'type' => 'story',
'language' => '',
'title' => 'Test title',
'uid' => '1',
'status' => '1',
'created' => '1388271197',
'changed' => '1420861423',
'comment' => '0',
'promote' => '0',
'moderate' => '0',
'sticky' => '0',
'tnid' => '0',
'translate' => '0',
),
);
$this->databaseContents['term_data'] = array(
array(
'tid' => '1',
'vid' => '3',
'name' => 'term 1 of vocabulary 3',
'description' => 'description of term 1 of vocabulary 3',
'weight' => '0',
),
array(
'tid' => '4',
'vid' => '3',
'name' => 'term 4 of vocabulary 3',
'description' => 'description of term 4 of vocabulary 3',
'weight' => '6',
),
array(
'tid' => '5',
'vid' => '3',
'name' => 'term 5 of vocabulary 3',
'description' => 'description of term 5 of vocabulary 3',
'weight' => '7',
),
);
parent::setUp();
}
}

View file

@ -1,17 +0,0 @@
<?php
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\d6\TermTest.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate\d6;
/**
* Tests D6 taxonomy term source plugin.
*
* @group taxonomy
*/
class TermTest extends TermTestBase {
}

View file

@ -18,9 +18,7 @@ class VocabularyTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary';
// The fake Migration configuration entity.
protected $migrationConfiguration = [
// The ID of the entity, can be any string.
'id' => 'test',
'source' => [
'plugin' => 'd6_vocabulary',

View file

@ -0,0 +1,57 @@
<?php
/**
* @file
* Contains \Drupal\Tests\taxonomy\Unit\Migrate\d7\VocabularyTest.
*/
namespace Drupal\Tests\taxonomy\Unit\Migrate\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* Tests D7 vocabulary source plugin.
*
* @group taxonomy
*/
class VocabularyTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary';
protected $migrationConfiguration = [
'id' => 'test',
'source' => [
'plugin' => 'd7_vocabulary',
],
];
protected $expectedResults = [
[
'vid' => 1,
'name' => 'Tags',
'description' => 'Tags description.',
'hierarchy' => 0,
'module' => 'taxonomy',
'weight' => 0,
'machine_name' => 'tags',
],
[
'vid' => 2,
'name' => 'Categories',
'description' => 'Categories description.',
'hierarchy' => 1,
'module' => 'taxonomy',
'weight' => 0,
'machine_name' => 'categories',
],
];
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->databaseContents['taxonomy_vocabulary'] = $this->expectedResults;
parent::setUp();
}
}