For testing purposes, the following bogus numbers can be used:
Visa: 4111111111111111
MasterCard: 5111111111111191
Discover: 6011111111111141
American Express: 371110201010004
You can enter any Customer Name, Expiration Date or CVV number with these test cards. The gateway will not let the payment go through, so the order will be put into a credit declined status. However these will let you run a test from putting an order through from the front end, without actually using your real credit card.