-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add data cleaning mechanism with annotation #29
base: master
Are you sure you want to change the base?
Conversation
MMh, Ok. Why not, it's like an "helper" for this redundant task. |
Hum, event based cleaners seems to be a good idea. I will do it today if i can. |
@stephpy some comments about this ? Useful to include in the bundle ? |
Hi, sorry for delay. That's a really good feature. I'm not sure but a function afterTestMethod {
kernel->shutdown();
} can avoid some issues of connections which could stay opened, no ? Then, we'll have in future to implements some clearer but how "client" will integrate it to application ? Since it is used via the eventDispatcher, we'll not be able to "activate/deactivate" a specific clearer. (I'm may be wrong) What about a ClearerCollection which add clearers (via atoumBundle or custom) via
It's only a proposal, i'm sorry for explain it 6 days after your first commit :s I can contribute to implement this idea if you like it and don't want to implement it yourself. |
+1 for kernel shutdown. The main goal of the event system is to define your own annotation based on
And you can pass options to the annotations to have a better granularity. I think it offers an highly customizable mechanism, no ? |
Yes, it is, that's a good idea (i did not understand it), forget my purpose, your solution is the best ! |
It appears ok. |
I can look for implementing |
I will try to add some docs this weekend. |
Few months ago we talked with @stephpy about a cleaning (db drop/create, load fixtures, etc) mechanism based on annotations on test method.
This is my implementation. There is only the base classes, users must implements their own cleaner and annotations (in the future we could provide generic annotations/cleaners).
Need your feedback about it :)