diff --git a/core/modules/entity_reference/src/Tests/Views/EntityReferenceRelationshipTest.php b/core/modules/entity_reference/src/Tests/Views/EntityReferenceRelationshipTest.php index b8b5eb1..4b8dd06 100644 --- a/core/modules/entity_reference/src/Tests/Views/EntityReferenceRelationshipTest.php +++ b/core/modules/entity_reference/src/Tests/Views/EntityReferenceRelationshipTest.php @@ -115,16 +115,16 @@ public function testRelationship() { // Check the backwards reference. $views_data_entity_test = Views::viewsData()->get('entity_test'); - $this->assertEqual($views_data_entity_test['reverse_entity_test__field_test']['relationship']['id'], 'entity_reverse'); - $this->assertEqual($views_data_entity_test['reverse_entity_test__field_test']['relationship']['base'], 'entity_test'); - $this->assertEqual($views_data_entity_test['reverse_entity_test__field_test']['relationship']['base field'], 'id'); - $this->assertEqual($views_data_entity_test['reverse_entity_test__field_test']['relationship']['field table'], 'entity_test__field_test'); - $this->assertEqual($views_data_entity_test['reverse_entity_test__field_test']['relationship']['field field'], 'field_test_target_id'); + $this->assertEqual($views_data_entity_test['reverse__entity_test__field_test']['relationship']['id'], 'entity_reverse'); + $this->assertEqual($views_data_entity_test['reverse__entity_test__field_test']['relationship']['base'], 'entity_test'); + $this->assertEqual($views_data_entity_test['reverse__entity_test__field_test']['relationship']['base field'], 'id'); + $this->assertEqual($views_data_entity_test['reverse__entity_test__field_test']['relationship']['field table'], 'entity_test__field_test'); + $this->assertEqual($views_data_entity_test['reverse__entity_test__field_test']['relationship']['field field'], 'field_test_target_id'); // Check an actual test view. $view = Views::getView('test_entity_reference_view'); - $this->executeView($view, 'default'); + $this->executeView($view); foreach (array_keys($view->result) as $index) { // Just check that the actual ID of the entity is the expected one. @@ -145,9 +145,9 @@ public function testRelationship() { $this->executeView($view, 'embed_1'); foreach (array_keys($view->result) as $index) { - $this->assertEqual($view->style_plugin->getField($index, 'id'), $this->entities[$index + 1]->id()); + $this->assertEqual($view->result[$index]->id, $this->entities[$index + 1]->id()); // The second and third entity refer to the first one. - $this->assertEqual($view->style_plugin->getField($index, 'id_1'), $index == 0 ? 0 : 1); + $this->assertEqual($view->result[$index]->entity_test_entity_test__field_test_id, $index == 0 ? NULL : 1); } }