function ArbitraryRebuildTest::testUserRegistrationMultipleField
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationMultipleField()
- 8.9.x core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationMultipleField()
- 10 core/modules/system/tests/src/Functional/Form/ArbitraryRebuildTest.php \Drupal\Tests\system\Functional\Form\ArbitraryRebuildTest::testUserRegistrationMultipleField()
Tests a rebuild caused by a multiple value field.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ArbitraryRebuildTest.php, line 75
Class
- ArbitraryRebuildTest
- Tests altering forms to be rebuilt so there are multiple steps.
Namespace
Drupal\Tests\system\Functional\FormCode
public function testUserRegistrationMultipleField() : void {
$edit = [
'name' => 'foo',
'mail' => 'bar@example.com',
];
$this->drupalGet('user/register');
$this->submitForm($edit, 'Add another item');
$this->assertSession()
->pageTextContains('Test a multiple valued field');
$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.