There are four utility methods in class TestFormBuilder that seem to never be used:
drupal8x (isssue/static)$ grep -r "drupalHtmlClass(" core/
core//tests/Drupal/Tests/Core/Form/FormTestBase.php: protected function drupalHtmlClass($class) {
drupal8x (isssue/static)$ grep -r "drupalHtmlId(" core/
core//tests/Drupal/Tests/Core/Form/FormTestBase.php: protected function drupalHtmlId($id) {
drupal8x (isssue/static)$ grep -r "drupalStaticReset(" core/
core//tests/Drupal/Tests/Core/Form/FormTestBase.php: public function drupalStaticReset($name = NULL) {
drupal8x (isssue/static)$ grep -r "requestUri(" core/
core//tests/Drupal/Tests/Core/Form/FormTestBase.php: protected function requestUri() {
Also ::sendResponse() is never called. There is a test method in FormBuilderTest that claims to test it but it never calls ::sendResponse() nor does it make any asserts.
They can probably all be removed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | four_methods_in_class-2456983-1.patch | 2.43 KB | cilefen |
Comments
Comment #1
cilefen commentedComment #3
rteijeiro commentedLooks good to me.
Comment #4
tim.plunkettOn my phone so I can't point out why this isn't all 100% right, will do so in the morning.
Comment #5
tim.plunkettNevermind, I missed that we have testHandleFormStateResponse() covering exactly the same code as testSendResponse(), my apologies.
Comment #6
alexpottTests are not frozen in beta. Committed 6d04d2b and pushed to 8.0.x. Thanks!
Comment #9
tim.plunkettSee #2474761: Remove TestFormBuilder completely for a follow-up.