One can test without any major issues a "local test / development" server. The gotcha is one will need configure and secure whatever webserver stack (LAMP, WAMP, MAMP, etc) and other servers / services (such as email) are decided upon. To make sure everything works the same in both the "local" and "production" environments, the environments need to match as closely as possible. This usually means taking the time to verify the "local test / development" server is running with the same software, software versions, and settings (as the "production" server).
One of the main advantages to using a "remote test / development" server is less time spent configuring and securing the server environment. Creating a "remote test / development" server can be quickly accomplished by simply creating a "subdomain" on the production server (with a separate document root / public_html). You can then configure the "subdomain" to block everyone by default and only allow access to the website by specific IPs or a password.
The major advantage to working on a "local test / development" server is you can configure additional debugging tools, do no need to copy files to a remote environment to test, features not requiring internet access can be tested w/o internet access (when on the go), and of course you can test changes without impacting other people who may be looking at or working on the website or application. The downside is you need to stage to a "remote test / development" server for others to see the changes.
I tend to use a "local test" server for active development and debugging. I tend to use "remote test" server to share stable changes with other members of the development team and with clients.
Note: This is just a short and quick discussion (there are other options as well). Depending on the project (including requirements, scope, and other factors), one will want to do their own evaluation and risk assessment to determine how to best "test" websites and applications prior to release on a "production / live" server. No matter what method(s) are used to test a website or application, one will want to take precautions to mitigate the associated risks of data being lost, corrupted, and / or stolen.