Closed rickmacgillis closed 9 years ago
Not for v1, unless someone from the community wants to chip in. v2 is being built with testing in mind.
Fair enough. I'll probably write them since I need them.
I think you'll have a hard time writing proper tests for v1 but PRs are always welcome!
Why do you say that?
All of v1 relies on direct links to core classes and the like meaning "true" unit tests are not possible. To be able to write tests you are going to need to make sure the main core package classes are available. And then there is the added complication of direct use of classes like Session
and Cookie
, these are not injectable so you are going to have to find a way to mock them sensibly.
I'll give it a go later. If it proves too inefficient, I'll just let it go. Do you have a ballpark idea of when version 2 should see a beta release? If it's not terribly far off, I'll probably just skip the unit tests altogether since I'm hoping to use version 2 for my next project, and just port some of the version 1 code over to save time.
We are looking at trying to get a first beta release early in the coming summer but it's unfortunately a little tricky to predict due to ongoing illnesses in the team. Best thing to do is keep an eye on the blog/twitter/irc if you want to stay up to date.
Sometimes things get missed and require updates to fix them. Having a testing kit for the packages you write will aid in locating any hidden bugs before they get committed. Thanks for your work!