diff --git a/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php b/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php index 50f8a15..828f124 100644 --- a/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php +++ b/core/modules/block_content/src/Tests/Views/RevisionRelationshipsTest.php @@ -59,6 +59,7 @@ public function testBlockContentRevisionRelationship() { $block_content_revision->save(); $column_map = array( 'revision_id' => 'revision_id', + 'id_1' => 'id_1', 'block_content_block_content_revision_id' => 'block_content_block_content_revision_id', ); @@ -68,10 +69,12 @@ public function testBlockContentRevisionRelationship() { $resultset_id = array( array( 'revision_id' => '1', + 'id_1' => '1', 'block_content_block_content_revision_id' => '1', ), array( 'revision_id' => '2', + 'id_1' => '1', 'block_content_block_content_revision_id' => '1', ), ); @@ -83,6 +86,7 @@ public function testBlockContentRevisionRelationship() { $resultset_revision_id = array( array( 'revision_id' => '2', + 'id_1' => '1', 'block_content_block_content_revision_id' => '1', ), ); diff --git a/core/modules/node/src/Tests/Views/RevisionRelationshipsTest.php b/core/modules/node/src/Tests/Views/RevisionRelationshipsTest.php index f29d023..dba99f5 100644 --- a/core/modules/node/src/Tests/Views/RevisionRelationshipsTest.php +++ b/core/modules/node/src/Tests/Views/RevisionRelationshipsTest.php @@ -49,6 +49,7 @@ public function testNodeRevisionRelationship() { $column_map = array( 'vid' => 'vid', 'node_node_revision_nid' => 'node_node_revision_nid', + 'nid_1' => 'nid_1', ); // Here should be two rows. @@ -58,10 +59,12 @@ public function testNodeRevisionRelationship() { array( 'vid' => '1', 'node_node_revision_nid' => '1', + 'nid_1' => '1', ), array( 'vid' => '2', 'node_node_revision_nid' => '1', + 'nid_1' => '1', ), ); $this->assertIdenticalResultset($view_nid, $resultset_nid, $column_map); @@ -73,6 +76,7 @@ public function testNodeRevisionRelationship() { array( 'vid' => '2', 'node_node_revision_nid' => '1', + 'nid_1' => '1', ), ); $this->assertIdenticalResultset($view_vid, $resultset_vid, $column_map); diff --git a/core/modules/options/src/Plugin/views/argument/NumberListField.php b/core/modules/options/src/Plugin/views/argument/NumberListField.php index 2f15eae..792381c 100644 --- a/core/modules/options/src/Plugin/views/argument/NumberListField.php +++ b/core/modules/options/src/Plugin/views/argument/NumberListField.php @@ -26,7 +26,7 @@ class NumberListField extends Numeric { use AllowedTagsXssTrait; - use \Drupal\views\FieldAPIHandlerTrait; + use FieldAPIHandlerTrait; /** * Stores the allowed values of this field. diff --git a/core/modules/options/src/Plugin/views/argument/StringListField.php b/core/modules/options/src/Plugin/views/argument/StringListField.php index 6f19b9c..da715c4 100644 --- a/core/modules/options/src/Plugin/views/argument/StringListField.php +++ b/core/modules/options/src/Plugin/views/argument/StringListField.php @@ -25,7 +25,7 @@ class StringListField extends String { use AllowedTagsXssTrait; - use \Drupal\views\FieldAPIHandlerTrait; + use FieldAPIHandlerTrait; /** * Stores the allowed values of this field. diff --git a/core/modules/options/src/Plugin/views/filter/ListField.php b/core/modules/options/src/Plugin/views/filter/ListField.php index 1221b70..f7cad30 100644 --- a/core/modules/options/src/Plugin/views/filter/ListField.php +++ b/core/modules/options/src/Plugin/views/filter/ListField.php @@ -21,7 +21,7 @@ */ class ListField extends ManyToOne { - use \Drupal\views\FieldAPIHandlerTrait; + use FieldAPIHandlerTrait; /** * {@inheritdoc} diff --git a/core/modules/views/src/Plugin/views/field/Field.php b/core/modules/views/src/Plugin/views/field/Field.php index 466f57f..c6fe3f6 100644 --- a/core/modules/views/src/Plugin/views/field/Field.php +++ b/core/modules/views/src/Plugin/views/field/Field.php @@ -41,7 +41,7 @@ class Field extends FieldPluginBase implements CacheablePluginInterface, MultiItemsFieldHandlerInterface { use EntityTranslationRenderTrait; - use \Drupal\views\FieldAPIHandlerTrait; + use FieldAPIHandlerTrait; /** * An array to store field renderable arrays for use by renderItems(). diff --git a/core/modules/views/src/Tests/Handler/FieldGroupRowsWebTest.php b/core/modules/views/src/Tests/Handler/FieldGroupRowsWebTest.php index 750b895..b6efe31 100644 --- a/core/modules/views/src/Tests/Handler/FieldGroupRowsWebTest.php +++ b/core/modules/views/src/Tests/Handler/FieldGroupRowsWebTest.php @@ -99,7 +99,7 @@ protected function setUp() { */ public function testGroupRows() { $this->drupalGet('test-group-rows'); - $result = $this->xpath('//div[contains(@class, "views-field-field-views-testing-group-")]/div'); + $result = $this->cssSelect('div.views-field-field-views-testing-group- div'); $rendered_value = []; foreach ($result as $row) { @@ -113,7 +113,7 @@ public function testGroupRows() { */ public function testUngroupedRows() { $this->drupalGet('test-ungroup-rows'); - $result = $this->xpath('//div[contains(@class, "views-field-field-views-testing-group-")]/div'); + $result = $this->cssSelect('div.views-field-field-views-testing-group- div'); $rendered_value = []; foreach ($result as $row) { $rendered_value[] = (string) $row[0]; diff --git a/core/modules/views/src/Tests/ViewResultAssertionTrait.php b/core/modules/views/src/Tests/ViewResultAssertionTrait.php index 4f730ca..222bf25 100644 --- a/core/modules/views/src/Tests/ViewResultAssertionTrait.php +++ b/core/modules/views/src/Tests/ViewResultAssertionTrait.php @@ -98,7 +98,7 @@ protected function assertIdenticalResultsetHelper($view, $expected_result, $colu // For entity fields we don't have the raw value. Let's try to fetch it // using the entity itself. elseif (empty($value->$view_column) && isset($view->field[$expected_column]) && ($field = $view->field[$expected_column]) && $field instanceof Field) { - $row[$expected_column] = $field->getEntity($value)->{$field->definition['field_name']}->value; + $row[$expected_column] = $field->getValue($value); } } $result[$key] = $row;