Properly mock out the publish! command

[#62649624]