Update to Drupal 8.1.8. For more information, see https://www.drupal.org/project/drupal/releases/8.1.8

This commit is contained in:
Pantheon Automation 2016-08-03 13:22:33 -07:00 committed by Greg Anderson
parent e9f047ccf8
commit f9f23cdf38
312 changed files with 6751 additions and 1546 deletions

View file

@ -201,8 +201,18 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase {
$this->assertEqual($build[0]['#cache']['tags'], $expected_cache_tags, format_string('The @formatter formatter has the expected cache tags.', array('@formatter' => $formatter)));
// Test the second field item.
$expected_rendered_name_field_2 = '
<div class="field field--name-name field--type-string field--label-hidden field__item">' . $this->unsavedReferencedEntity->label() . '</div>
';
$expected_rendered_body_field_2 = '
<div class="clearfix text-formatted field field--name-body field--type-text field--label-above">
<div class="field__label">Body</div>
<div class="field__item"><p>Hello, unsaved world!</p></div>
</div>
';
$renderer->renderRoot($build[1]);
$this->assertEqual($build[1]['#markup'], $this->unsavedReferencedEntity->label(), sprintf('The markup returned by the %s formatter is correct for an item with a unsaved entity.', $formatter));
$this->assertEqual($build[1]['#markup'], 'default | ' . $this->unsavedReferencedEntity->label() . $expected_rendered_name_field_2 . $expected_rendered_body_field_2, sprintf('The markup returned by the %s formatter is correct for an item with a unsaved entity.', $formatter));
}
/**
@ -271,6 +281,7 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase {
* Tests the label formatter.
*/
public function testLabelFormatter() {
$this->installEntitySchema('entity_test_label');
/** @var \Drupal\Core\Render\RendererInterface $renderer */
$renderer = $this->container->get('renderer');
$formatter = 'entity_reference_label';

View file

@ -6,6 +6,7 @@ use Drupal\comment\Entity\CommentType;
use Drupal\Core\Database\Database;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\Entity\EntityViewDisplay;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\node\Entity\NodeType;
@ -88,6 +89,8 @@ class MigrateFieldFormatterSettingsTest extends MigrateDrupal7TestBase {
'label' => $this->randomMachineName(),
])->save();
Vocabulary::create(['vid' => 'test_vocabulary'])->save();
// Give one unfortunate field instance invalid display settings to ensure
// that the migration provides an empty array as a default (thus avoiding
// an "unsupported operand types" fatal).

View file

@ -5,6 +5,7 @@ namespace Drupal\Tests\field\Kernel\Migrate\d7;
use Drupal\comment\Entity\CommentType;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\FieldConfigInterface;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\node\Entity\NodeType;
@ -45,6 +46,7 @@ class MigrateFieldInstanceTest extends MigrateDrupal7TestBase {
$this->createType('book');
$this->createType('forum');
$this->createType('test_content_type');
Vocabulary::create(['vid' => 'test_vocabulary'])->save();
$this->executeMigrations(['d7_field', 'd7_field_instance']);
}

View file

@ -45,6 +45,7 @@ class MigrateFieldInstanceWidgetSettingsTest extends MigrateDrupal7TestBase {
$this->executeMigrations([
'd7_node_type',
'd7_comment_type',
'd7_taxonomy_vocabulary',
'd7_field',
'd7_field_instance',
'd7_field_instance_widget_settings',
@ -126,6 +127,16 @@ class MigrateFieldInstanceWidgetSettingsTest extends MigrateDrupal7TestBase {
$this->assertComponent('node.test_content_type.default', 'field_term_reference', 'entity_reference_autocomplete', 14);
$this->assertComponent('node.test_content_type.default', 'field_text', 'text_textfield', 15);
$this->assertComponent('node.test_content_type.default', 'field_text_list', 'options_select', 11);
$this->assertEntity('user.user.default', 'user', 'user');
$this->assertComponent('user.user.default', 'field_file', 'file_generic', 8);
$this->assertEntity('comment.comment_node_test_content_type.default', 'comment', 'comment_node_test_content_type');
$this->assertComponent('comment.comment_node_test_content_type.default', 'comment_body', 'text_textarea', 0);
$this->assertComponent('comment.comment_node_test_content_type.default', 'field_integer', 'number', 2);
$this->assertEntity('taxonomy_term.test_vocabulary.default', 'taxonomy_term', 'test_vocabulary');
$this->assertComponent('comment.comment_node_test_content_type.default', 'field_integer', 'number', 2);
}
}

View file

@ -13,7 +13,7 @@ use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
*/
class MigrateViewModesTest extends MigrateDrupal7TestBase {
public static $modules = ['comment', 'node'];
public static $modules = ['comment', 'node', 'taxonomy'];
/**
* {@inheritdoc}
@ -52,6 +52,7 @@ class MigrateViewModesTest extends MigrateDrupal7TestBase {
$this->assertEntity('comment.full', 'Full', 'comment');
$this->assertEntity('node.teaser', 'Teaser', 'node');
$this->assertEntity('node.full', 'Full', 'node');
$this->assertEntity('node.custom', 'custom', 'node');
$this->assertEntity('user.full', 'Full', 'user');
}