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

@ -0,0 +1,64 @@
<?php
/**
* @file
* Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentVariablePerCommentTypeTest.
*/
namespace Drupal\Tests\comment\Unit\Migrate\d6;
use Drupal\comment\Plugin\migrate\source\d6\CommentVariablePerCommentType;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* @coversDefaultClass \Drupal\comment\Plugin\migrate\source\d6\CommentVariablePerCommentType
* @group comment
*/
class CommentVariablePerCommentTypeTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = CommentVariablePerCommentType::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_comment_variable_per_comment_type',
),
);
protected $expectedResults = array(
// Each result will also include a label and description, but those are
// static values set by the source plugin and don't need to be asserted.
array(
'comment_type' => 'comment_no_subject',
),
array(
'comment_type' => 'comment',
),
);
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->databaseContents['node_type'] = array(
array(
'type' => 'page',
),
array(
'type' => 'story',
),
);
$this->databaseContents['variable'] = array(
array(
'name' => 'comment_subject_field_page',
'value' => serialize(1),
),
array(
'name' => 'comment_subject_field_story',
'value' => serialize(0),
),
);
parent::setUp();
}
}

View file

@ -0,0 +1,94 @@
<?php
/**
* @file
* Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentVariableTest.
*/
namespace Drupal\Tests\comment\Unit\Migrate\d6;
use Drupal\comment\Plugin\migrate\source\d6\CommentVariable;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* @coversDefaultClass \Drupal\comment\Plugin\migrate\source\d6\CommentVariable
* @group comment
*/
class CommentVariableTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = CommentVariable::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_comment_variable',
),
);
protected $expectedResults = array(
array(
'comment' => '1',
'comment_default_mode' => '1',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '1',
'comment_anonymous' => '1',
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '1',
'node_type' => 'page',
'comment_type' => 'comment',
),
);
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->databaseContents['node_type'] = array(
array(
'type' => 'page',
),
);
$this->databaseContents['variable'] = array(
array(
'name' => 'comment_page',
'value' => serialize(1),
),
array(
'name' => 'comment_default_mode_page',
'value' => serialize(1),
),
array(
'name' => 'comment_default_order_page',
'value' => serialize(1),
),
array(
'name' => 'comment_default_per_page_page',
'value' => serialize(50),
),
array(
'name' => 'comment_controls_page',
'value' => serialize(1),
),
array(
'name' => 'comment_anonymous_page',
'value' => serialize(1),
),
array(
'name' => 'comment_subject_field_page',
'value' => serialize(1),
),
array(
'name' => 'comment_preview_page',
'value' => serialize(1),
),
array(
'name' => 'comment_form_location_page',
'value' => serialize(1),
),
);
parent::setUp();
}
}