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

This commit is contained in:
Pantheon Automation 2016-10-06 15:16:20 -07:00 committed by Greg Anderson
parent 2f563ab520
commit f1c8716f57
1732 changed files with 52334 additions and 11780 deletions

View file

@ -59,16 +59,16 @@ class TextWithSummaryItemTest extends FieldKernelTestBase {
$this->createField($entity_type);
// Create an entity with a summary and no text format.
$entity = $this->container->get('entity_type.manager')
->getStorage($entity_type)
->create();
$storage = $this->container->get('entity_type.manager')
->getStorage($entity_type);
$entity = $storage->create();
$entity->summary_field->value = $value = $this->randomMachineName();
$entity->summary_field->summary = $summary = $this->randomMachineName();
$entity->summary_field->format = NULL;
$entity->name->value = $this->randomMachineName();
$entity->save();
$entity = entity_load($entity_type, $entity->id());
$entity = $storage->load($entity->id());
$this->assertTrue($entity->summary_field instanceof FieldItemListInterface, 'Field implements interface.');
$this->assertTrue($entity->summary_field[0] instanceof FieldItemInterface, 'Field item implements interface.');
$this->assertEqual($entity->summary_field->value, $value);