Issue #3280882 by mondrake, mallezie: KernelTestBase::tearDown() cleanup prevents good typehinting practices (cherry picked from commit e3983382)