Uh oh!
There was an error while loading. Please reload this page.
Updating bootstrap to get rid of Di and use ServiceManager - #19
Updating bootstrap to get rid of Di and use ServiceManager#19SocalNick wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Can you use TestConfiguration.php.dist or TestConfiguration.php for this?
Also, I'd stop instantiating the service manager here and instead use something like https://github.com/Ocramius/OcraDiCompiler/blob/master/tests/OcraDiCompilerTest/ServiceManagerTestCase.php
Freeaqingme
commented
Sep 29, 2012
@SocalNick This pull request has been open for two months. Do you see any opportunity to look at @Ocramius his comment? |
Conflicts: tests/bootstrap.php
SocalNick
commented
Oct 3, 2012
I'm not sure if I understand why we would need the $config in TestConfiguration.php.dist? There isn't much more besides modules and module_paths. Furthermore, this is really a jumping off point. If your testing needs are more complex, you likely have your own bootstrap. As for @Ocramius point about instantiating a new Service Manager, I looked at the OcraDiCompiler test suite and none of the tests cases extend ServiceManagerTestCase. Either way, I'm leaning more towards the approach @EvanDotPro took with this module: https://github.com/EvanDotPro/SpeckCart/blob/master/tests/Bootstrap.php Should I change to an OOP bootstrap and file another PR? |
Ocramius
commented
Oct 3, 2012
It is not relevant to have an OOP bootstrap or something functional. It is I used OcraDiCompiler's test util (it is not really a test case) in the Marco Pivetta On 3 October 2012 03:15, Nicholas Calugar notifications@github.com wrote:
|
weierophinney
commented
Oct 17, 2012
Question: do we want to continue with this route, or go with the one started in ZF-Commons/ZfcBase? The latter feels easier to me, and addresses the concerns @Ocramius mentions. Thoughts? |
Ocramius
commented
Oct 17, 2012
@weierophinney ZfcBase doesn't yet solve this either: https://github.com/ZF-Commons/ZfcBase/blob/52a52c23f82242ce7ff0fcba08488dc52180ee13/tests/Bootstrap.php#L54-57 (currently) |
SocalNick
commented
Oct 17, 2012
Sorry for not being able to get to this in a timely fashion. Work has been crazy. I'm hoping to tackle some OSS stuff during ZendCon when I don't have work duties to attend to. @weierophinney are we going to have another late night hack session like last year?! |
weierophinney
commented
Oct 17, 2012
@SocalNick ABSOLUTELY! :) |
cgmartin
commented
Jan 10, 2013
Friendly reminder about this one since it's been 3 months. :) It would be nice to clean up the DI stuff to reduce confusion and provide a good jumping off point for newcomers writing module tests. |
lboynton
commented
Mar 11, 2013
Yep, would really like a good boostrap to use for my module unit tests! I have looked at a few of the solutions so far, but I'm still not sure how best to unit test a module with dependencies on other modules. |
SocalNick
commented
Mar 11, 2013
@lboynton I've been using a variation of @weierophinney test bootstrap: https://github.com/weierophinney/PhlySimplePage/tree/master/test |
lboynton
commented
Mar 11, 2013
Thanks, will take a look! On 11 March 2013 16:12, Nicholas Calugar notifications@github.com wrote:
|
SocalNick
commented
Jul 17, 2019
Wow, how is this still open?! Took me back reading the thread, hope everyone is doing well! |
No description provided.