Take a look at Test::MockObject. What you are trying to test is the script, not the database, therefore you can fake the database (and its date and dayofweek functions) using MockObjects.
Do a super search on Test::MockObject to see some other uses of mocking. It is a very powerful technique that allows you to concentrate on the main job of your code, and it allows you to keep testdata and tests in the same place.
Good luck!
pernod
--
Mischief. Mayhem. Soap.
In reply to Re: Testing and database date functions
by pernod
in thread Testing and database date functions
by relax99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |