diff --git a/core/modules/views/src/Tests/Handler/HandlerTestBase.php b/core/modules/views/src/Tests/Handler/HandlerTestBase.php
index 5345f47b05e600c82e4b71d0c563468ab1e76b7a..1603329bdbb1939efd522db65c88c71ef8407820 100644
--- a/core/modules/views/src/Tests/Handler/HandlerTestBase.php
+++ b/core/modules/views/src/Tests/Handler/HandlerTestBase.php
@@ -1,11 +1,13 @@
['all'],
];
- protected function setUp() {
- parent::setUp();
+ protected function setUp($import_test_views = TRUE) {
+ parent::setUp($import_test_views);
$this->drupalPlaceBlock('page_title_block');
diff --git a/core/modules/views/src/Tests/Entity/BaseFieldAccessTest.php b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
similarity index 89%
rename from core/modules/views/src/Tests/Entity/BaseFieldAccessTest.php
rename to core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
index 698a43e79f810a51c59802ef744366d40f36655f..19aa191e1413b11d2aff7c661e95205cab3af7c6 100644
--- a/core/modules/views/src/Tests/Entity/BaseFieldAccessTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php
@@ -1,9 +1,9 @@
container->get('entity.definition_update_manager');
\Drupal::entityManager()->clearCachedDefinitions();
diff --git a/core/modules/views/src/Tests/Entity/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
similarity index 96%
rename from core/modules/views/src/Tests/Entity/FieldEntityTest.php
rename to core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
index 89f71edf0c3c3f8c95ab281b3257313da5685626..a46e54c9e5817b46e4782675021949cd8ff17514 100644
--- a/core/modules/views/src/Tests/Entity/FieldEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php
@@ -1,11 +1,11 @@
cssSelect('div.views-row');
foreach ($rows as $row) {
$actual[] = [
- 'title' => (string) $row->xpath((new CssSelectorConverter())->toXPath('.views-field-title span.field-content a'))[0],
- 'sticky' => (string) $row->xpath((new CssSelectorConverter())->toXPath('.views-field-sticky span.field-content'))[0],
+ 'title' => $row->find('xpath', (new CssSelectorConverter())->toXPath('.views-field-title span.field-content a'))->getText(),
+ 'sticky' => $row->find('xpath', (new CssSelectorConverter())->toXPath('.views-field-sticky span.field-content'))->getText(),
];
}
$this->assertEqual($actual, $expected);
diff --git a/core/modules/views/src/Tests/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
similarity index 95%
rename from core/modules/views/src/Tests/Entity/FilterEntityBundleTest.php
rename to core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
index f099569b80b410f0fe7c0f45c07133eb5ff1d6e6..993293cebf48e85e837be085e72882e7357ee547 100644
--- a/core/modules/views/src/Tests/Entity/FilterEntityBundleTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php
@@ -1,9 +1,9 @@
drupalCreateContentType(['type' => 'test_bundle']);
diff --git a/core/modules/views/src/Tests/Entity/ViewNonTranslatableEntityTest.php b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
similarity index 87%
rename from core/modules/views/src/Tests/Entity/ViewNonTranslatableEntityTest.php
rename to core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
index 82c683995cfa922dabfde1713025f6ed6e79cc94..911cd61e66a5c04bfb701824f00372dc1273794b 100644
--- a/core/modules/views/src/Tests/Entity/ViewNonTranslatableEntityTest.php
+++ b/core/modules/views/tests/src/Functional/Entity/ViewNonTranslatableEntityTest.php
@@ -1,17 +1,17 @@
xpath('//a[contains(@href, :href) and normalize-space(text())=:label]/..', [':href' => $href, ':label' => $label]);
$this->assertTrue(count($result));
- // The rendered output looks like "| (count)" so let's figure out the int.
- $result_count = trim(str_replace(['|', '(', ')'], '', (string) $result[0]));
+ // The rendered output looks like "X | (count)" so let's
+ // figure out the int.
+ $result_count = explode(' ', trim(str_replace(['|', '(', ')'], '', $result[0]->getText())))[1];
$this->assertEqual($result_count, $count, 'The expected number got rendered.');
}
}
diff --git a/core/modules/views/src/Tests/Handler/AreaHTTPStatusCodeTest.php b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
similarity index 86%
rename from core/modules/views/src/Tests/Handler/AreaHTTPStatusCodeTest.php
rename to core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
index 2656adc4dcdb6898e1ea25797ab504b09016bc41..dc914ce219e6d0f8aeb575b647faf5e366d2771c 100644
--- a/core/modules/views/src/Tests/Handler/AreaHTTPStatusCodeTest.php
+++ b/core/modules/views/tests/src/Functional/Handler/AreaHTTPStatusCodeTest.php
@@ -1,7 +1,8 @@
enableViewsTestModule();
}
@@ -110,41 +111,6 @@ public function testRenderArea() {
$this->assertTrue(strpos($output, '