function ArbitraryRebuildTest::testUserRegistrationRebuild
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationRebuild()
- 8.9.x core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationRebuild()
- 11.x core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationRebuild()
Tests a basic rebuild with the user registration form.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ArbitraryRebuildTest.php, line 60
Class
- ArbitraryRebuildTest
- Tests altering forms to be rebuilt so there are multiple steps.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testUserRegistrationRebuild() : void {
$edit = [
'name' => 'foo',
'mail' => 'bar@example.com',
];
$this->drupalGet('user/register');
$this->submitForm($edit, 'Rebuild');
$this->assertSession()
->pageTextContains('Form rebuilt.');
$this->assertSession()
->fieldValueEquals('name', 'foo');
$this->assertSession()
->fieldValueEquals('mail', 'bar@example.com');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.