Same filename and directory in other branches
- 8.9.x core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
- 9 core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
Namespace
Drupal\Tests\system\Functional\Form
File
core/modules/system/tests/src/Functional/Form/ElementsAccessTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\system\Functional\Form;
use Drupal\Tests\BrowserTestBase;
class ElementsAccessTest extends BrowserTestBase {
protected static $modules = [
'form_test',
];
protected $defaultTheme = 'stark';
public function testAccessFalse() {
$this
->drupalGet('form_test/vertical-tabs-access');
$this
->submitForm([], 'Submit');
$this
->assertSession()
->pageTextNotContains('This checkbox inside a vertical tab does not have its default value.');
$this
->assertSession()
->pageTextNotContains('This textfield inside a vertical tab does not have its default value.');
$this
->assertSession()
->pageTextNotContains('This checkbox inside a fieldset does not have its default value.');
$this
->assertSession()
->pageTextNotContains('This checkbox inside a container does not have its default value.');
$this
->assertSession()
->pageTextNotContains('This checkbox inside a nested container does not have its default value.');
$this
->assertSession()
->pageTextNotContains('This checkbox inside a vertical tab whose fieldset access is allowed does not have its default value.');
$this
->assertSession()
->pageTextContains('The form submitted correctly.');
}
}
Classes