protected function PrepopulateFormTest::assertPrepopulate in Prepopulate 8.2
Assert all values are prepopulated as expected.
Parameters
string $query: The prepopulated query string.
string $expected: The expected result after submitting the form.
Throws
\Behat\Mink\Exception\ResponseTextException
2 calls to PrepopulateFormTest::assertPrepopulate()
- PrepopulateFormTest::testAllPrepopulate in tests/
src/ Functional/ PrepopulateFormTest.php - Test pre-populating all values into a form. Safe and unsafe inputs.
- PrepopulateFormTest::testUnsafePrepopulate in tests/
src/ Functional/ PrepopulateFormTest.php - Test pre-populating unsafe inputs in a form.
File
- tests/
src/ Functional/ PrepopulateFormTest.php, line 122
Class
- PrepopulateFormTest
- Form functionality tests of prepopulate.
Namespace
Drupal\Tests\prepopulate\FunctionalCode
protected function assertPrepopulate($query, $expected) {
$this
->drupalGet(Url::fromUri('internal:/prepopulate_test/form?' . $query));
$this
->drupalPostForm(NULL, [], 'Submit');
$this
->assertSession()
->pageTextContains($expected);
}