diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageAwareCombinationTest.php index 6b60907..6688530 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageAwareCombinationTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageAwareCombinationTest.php @@ -35,6 +35,13 @@ class NodeAccessLanguageAwareCombinationTest extends NodeTestBase { */ protected $web_user; + /** + * User 1. + * + * @var \Drupal\user\Plugin\Core\Entity\User. + */ + protected $admin_user; + public static function getInfo() { return array( 'name' => 'Node access language-aware combination', diff --git a/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module b/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module index cf3c87f..1baa48e 100644 --- a/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module +++ b/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module @@ -49,7 +49,7 @@ function node_access_test_language_node_access_records(EntityInterface $node) { * (restricted access) in a given translation. */ function node_access_test_language_enable() { - entity_create('field_entity', array( + $field_private = entity_create('field_entity', array( 'field_name' => 'field_private', 'type' => 'list_boolean', 'cardinality' => 1, @@ -57,9 +57,11 @@ function node_access_test_language_enable() { 'settings' => array( 'allowed_values' => array(0 => 'Not private', 1 => 'Private'), ), - ))->save(); + )); + $field_private->save(); + entity_create('field_instance', array( - 'field_name' => $field_private['field_name'], + 'field_name' => $field_private->id(), 'entity_type' => 'node', 'bundle' => 'page', 'widget' => array( diff --git a/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php b/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php index 0f96692..8d335c3 100644 --- a/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php +++ b/core/modules/options/lib/Drupal/options/Tests/OptionsWidgetsTest.php @@ -44,7 +44,7 @@ class OptionsWidgetsTest extends FieldTestBase { protected $bool; /** - * A user with permission to view a and manage entities. + * A user with permission to view and manage entities. * * @var \Drupal\user\UserInterface */ @@ -258,7 +258,7 @@ function testCheckBoxes() { */ function testSelectListSingle() { // Create an instance of the 'single value' field. - $instance = entity_create('field_entity', array( + $instance = entity_create('field_instance', array( 'field_name' => $this->card_1->id(), 'entity_type' => 'entity_test', 'bundle' => 'entity_test', @@ -361,13 +361,13 @@ function testSelectListSingle() { function testSelectListMultiple() { // Create an instance of the 'multiple values' field. $instance = entity_create('field_instance', array( - 'field_name' => $this->card_2->field_name, + 'field_name' => $this->card_2->id(), 'entity_type' => 'entity_test', 'bundle' => 'entity_test', )); $instance->save(); entity_get_form_display('entity_test', 'entity_test', 'default') - ->setComponent($this->card_2->field_name, array( + ->setComponent($this->card_2->id(), array( 'type' => 'options_select', )) ->save();