3 namespace Drupal\Tests\views\Functional\Plugin;
5 use Drupal\Tests\views\Functional\ViewTestBase;
8 * Tests Views forms functionality.
12 class ViewsFormTest extends ViewTestBase {
19 public static $modules = ['action_bulk_test'];
22 * Tests the Views form wrapper.
24 public function testFormWrapper() {
25 $this->drupalGet('test_bulk_form');
26 // Ensure we have the form tag on the page.
27 $xpath = $this->cssSelect('.views-form form');
28 $this->assertIdentical(count($xpath), 1, 'There is one views form on the page.');
29 // Ensure we don't have nested form elements.
30 $result = (bool) preg_match('#<form[^>]*?>(?!/form).*<form#s', $this->getSession()->getPage()->getContent());
31 $this->assertFalse($result, 'The views form element is not nested.');