Issue #2560729 by stefan.r, lauriii: Cast objects implementing SafeStringInterface to string in TestBase / WebTestBase