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.

CommentFileSizeAuthor
#1 four_methods_in_class-2456983-1.patch2.43 KBcilefen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cilefen’s picture

Title: Four methods in class TestFormBuilder are dead code. Remove them. » Five methods in class TestFormBuilder are dead code. Remove them.
Issue summary: View changes
Status: Active » Needs review
FileSize
2.43 KB

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work

On my phone so I can't point out why this isn't all 100% right, will do so in the morning.

tim.plunkett’s picture

Status: Needs work » Reviewed & tested by the community

Nevermind, I missed that we have testHandleFormStateResponse() covering exactly the same code as testSendResponse(), my apologies.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Tests are not frozen in beta. Committed 6d04d2b and pushed to 8.0.x. Thanks!

  • alexpott committed 6d04d2b on 8.0.x
    Issue #2456983 by cilefen: Five methods in class TestFormBuilder are...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tim.plunkett’s picture