function BrowserTestBaseTest::testLegacyDrupalPostForm
Tests deprecation of drupalPostForm().
@group legacy
File
-
core/
tests/ Drupal/ FunctionalTests/ BrowserTestBaseTest.php, line 899
Class
- BrowserTestBaseTest
- Tests BrowserTestBase functionality.
Namespace
Drupal\FunctionalTestsCode
public function testLegacyDrupalPostForm() : void {
$this->expectDeprecation('UiHelperTrait::drupalPostForm() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use $this->submitForm() instead. See https://www.drupal.org/node/3168858');
$this->expectDeprecation('Calling Drupal\\Tests\\UiHelperTrait::drupalPostForm() with $submit as an object is deprecated in drupal:9.2.0 and the method is removed in drupal:10.0.0. Use $this->submitForm() instead. See https://www.drupal.org/node/3168858');
$this->expectDeprecation('Calling Drupal\\Tests\\UiHelperTrait::drupalPostForm() with $edit set to NULL is deprecated in drupal:9.1.0 and the method is removed in drupal:10.0.0. Use $this->submitForm() instead. See https://www.drupal.org/node/3168858');
$this->drupalPostForm('form-test/object-builder', NULL, t('Save'));
$this->expectDeprecation('Calling Drupal\\Tests\\UiHelperTrait::drupalPostForm() with $path set to NULL is deprecated in drupal:9.2.0 and the method is removed in drupal:10.0.0. Use $this->submitForm() instead. See https://www.drupal.org/node/3168858');
$this->drupalPostForm(NULL, [], 'Save');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.