This change is made with BC in mind and to make it easier to convert system functional tests to phpunit since new tests should be using \Drupal\Tests\BrowserTestBase
(See #2867154: Form: Convert system functional tests to phpunit).
Before:
\Drupal\Tests\BrowserTestBase::drupalPostForm
would not return any value.
After:
\Drupal\Tests\BrowserTestBase::drupalPostForm
returns the HTML of the rendered page, to match the same return value as \Drupal\simpletest\WebTestBase::drupalPostForm
.
The return of \Drupal\Tests\BrowserTestBase::drupalPostForm
will be deprecated on 9.0.x and users should just use the webAssert object for their assertions instead.