But someone said this was wrong they said the testing server has to be local on my computer...
There is nothing wrong with this.
The recommendation is: don't push untested code to a production server.
This would only really matter if this is for a commercial website.
It doesn't matter too much for a personal website. Although it is generally easier/faster to test on a local server.