Accommodate url_for_test to be in sync with the deprecation of passing only_path

Accommodate url_for_test to be in sync with the deprecation of passing `only_path: true` option.