diff --git a/core/lib/Drupal/Core/Form/FormBase.php b/core/lib/Drupal/Core/Form/FormBase.php deleted file mode 100644 index b542e7e..0000000 --- a/core/lib/Drupal/Core/Form/FormBase.php +++ /dev/null @@ -1,22 +0,0 @@ -drupalGet('form-test/object-builder'); $this->assertText('The FormTestObject::form() method was used for this form.'); - $elements = $this->xpath('//form[@id="drupal-form-test-formtestobject"]'); - $this->assertTrue(!empty($elements), 'The correct form ID was used even when it is not the callback function name.'); + $elements = $this->xpath('//form[@id="form-test-form-test-object"]'); + $this->assertTrue(!empty($elements), 'The correct form ID was used.'); $this->drupalPost('form-test/object-builder', NULL, t('Save')); $this->assertText('The FormTestObject::validate() method was used for this form.'); $this->assertText('The FormTestObject::submit() method was used for this form.'); diff --git a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestObject.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestObject.php index 1df1485..4a4269c 100644 --- a/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestObject.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/FormTestObject.php @@ -7,12 +7,19 @@ namespace Drupal\form_test; -use Drupal\Core\Form\FormBase; +use Drupal\Core\Form\FormInterface; /** * Provides a test Form object. */ -class FormTestObject extends FormBase { +class FormTestObject implements FormInterface { + + /** + * Implements \Drupal\Core\Form\FormInterface::getFormID(). + */ + public function getFormID() { + return 'form_test_form_test_object'; + } /** * Implements \Drupal\Core\Form\FormInterface::form().