fuel / auth

Fuel PHP Framework - Fuel v1.x Authentication package
http://fuelphp.com/docs/packages/auth/intro.html
76 stars 57 forks source link

[TESTS] Will you make tests for your packages? #103

Closed rickmacgillis closed 9 years ago

rickmacgillis commented 9 years ago

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!

emlynwest commented 9 years ago

Not for v1, unless someone from the community wants to chip in. v2 is being built with testing in mind.

rickmacgillis commented 9 years ago

Fair enough. I'll probably write them since I need them.

emlynwest commented 9 years ago

I think you'll have a hard time writing proper tests for v1 but PRs are always welcome!

rickmacgillis commented 9 years ago

Why do you say that?

emlynwest commented 9 years ago

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.

rickmacgillis commented 9 years ago

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.

emlynwest commented 9 years ago

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.