fix getText shim function in tests