Reputation: 93338
PHPUnit works great, I love it actually, problem I'm having is that my hosting plan imposes a 30 second cap on the duration of a query. If PHPUnit tests take longer than that, the connection is closed by the server, and I never get to find out if all my tests passed or not.
Is there an existing automatic way of running an arbitrarily long test suite using AJAX to batch unit tests so that they'd never hit the 30s threshold? As long as each individual test takes less than 30s I think it should work.
Thanks
Upvotes: 1
Views: 664
Reputation: 18115
Why are you running the tests on the production server? Your tests are for running on your development server, to make sure your code is good before sending into production.
Upvotes: 1
Reputation: 35149
You may be able to change the default timeout with set_time_limit
(link). That resets the time left to run whenever it's run.
Upvotes: 0