Return a changes dictionary for file.managed in test=true mode

Fixes #17939.