- Issue created by @tr
Turning on phpstan evaluation of the test cases (see
π
Add declare(strict_types=1) to all test modules
Active
) reveals that we still have code in the tests that uses drupalPostAjaxForm()
. This method was part of Simpletest and was removed from Drupal core more than 5 years ago by
#2809161: Convert Javascript/AJAX testing to use JavascriptTestBase β
This method is called from LinkTypeFieldEntryTest::doFlagUiFieldPlugin()
which appears to be a utility function for internal use in Flag tests (but it's not declared protected for some reason). However, this utility function is never called so in practice the non-existent drupalPostAjaxForm()
never gets called either. That's why this problem only shows up with static analysis, and not in the PHPUnit test output.
This problem was pointed out years ago in #2751053: Convert Simpletests to PHPUnit β but it seems to have been overlooked in the eventual commits.
The simplest thing would be to just delete doFlagUiFieldPlugin()
entirely. My preference would be to first determine what that function was intended to test, and before deleting this ensure that Flag does have a WebDriver test that was ported from this Simpletest method at some point.
Active
4.0
Flag core