_theme() is deprecated, but \Drupal\simpletest\WebTestBase::assertThemeOutput() is still basically a wrapper around _theme().
Add a new helper method to WebTestBase (maybe assertRenderOutput()) for checking the output of render arrays. I found assertRenderedElement() in \Drupal\system\Tests\Common\RenderWebTest but that is using XPath which I'm not sure whether we want to use or not.
Create the patch
User interface changes
Adds a new helper to WebTestBase for checking theme output.