Problem/Motivation
The fix merged in Outbound HTTP requests fail with KernelTestBase #51 added test coverage that does not perform any assertion, which is considered an antipattern.
PHPUnit would complain about it, but as @alexpott wrote in #53:
@mxr576 good point - can you create a follow-up issue to add an assertion. It doesn't fail because we have an assertion in \Drupal\KernelTests\KernelTestBaseTest::tearDown()
This is true: https://github.com/drupal/core/blob/325813c889288bd6bd6b8e7590c43e704eb6...
Isn't this a code smell too? It hides issues with useless, incorrect tests as the test in the subject example perfectly represents it.
Steps to reproduce
Proposed resolution
* Add missing assert to KernelTestBaseTest::testOutboundHttpRequest()
.
* Remove asserts from tearDown() ?
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3196470
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mxr576Comment #4
mxr576I did not change anything related to
Probably that should be solved in another follow-up issue...
Comment #5
longwaveOpened #3196507: KernelTestBaseTest::tearDown() should not perform assertions as followup.
Comment #7
longwaveMR still applies, no reason to hold this back.
Comment #9
catchCommitted 3e5c6f5 and pushed to 9.3.x. Thanks!