diff --git a/core/modules/views/src/Tests/Plugin/ViewsFormTest.php b/core/modules/views/src/Tests/Plugin/ViewsFormTest.php new file mode 100644 index 0000000..bbdd42a --- /dev/null +++ b/core/modules/views/src/Tests/Plugin/ViewsFormTest.php @@ -0,0 +1,39 @@ +drupalGet('test_bulk_form'); + // Ensure we have the form tag on the page. + $xpath = $this->cssSelect('.views-form form'); + $this->assertIdentical(count($xpath), 1, 'There is one views form on the page.'); + // Ensure we don't have nested form elements. + $result = (bool) preg_match('#]*?>(?!/form).*getRawContent()); + $this->assertFalse($result, 'The views form element is not nested.'); + } +}