Clean up test suite and add a functional test case#24
Clean up test suite and add a functional test case#24cboden merged 4 commits intoreactphp:masterfrom
Conversation
tests/bootstrap.php
Outdated
There was a problem hiding this comment.
Any particular reason to place TestCase in the bootstrap rather then it's own file?
|
Aside from the |
|
Thanks for your feedback @WyriHaximus, makes sense and has just been resolved! 👍 |
tests/TestCase.php
Outdated
There was a problem hiding this comment.
These 2 methods can be shortened to:
protected function createPromiseResolved($value = null)
{
return Promise\resolve($value);
}
protected function createPromiseRejected($value = null)
{
return Promise\reject($value);
}which makes them kind of obsolete ;)
There was a problem hiding this comment.
Agreed, they are of little use, in particular given they're not even used as part of this PR :)
My initial motivation was to support react/promise v1 and v2 alike, but after talking to @jsor, we concluded that it's much cleaner to provide an intermediary v1.1 release to ease transition. Long story short: Let's keep this apart from this PR for now :)
There was a problem hiding this comment.
after talking to @jsor, we concluded that it's much cleaner to provide an intermediary v1.1 release to ease transition
Just for the reference, this is now being tracked in reactphp/promise#31
|
Thanks for the feedback @jsor and @WyriHaximus, everything's just been resolved 👍 |
|
Ping @WyriHaximus, @jsor |
|
About the removal of tests/bootstrap.php: @cboden once opened reactphp/promise#17 to allow running the tests when installed as a dependency. Not sure this is still relevant. |
Personally, I would consider this a non-issue. After all, why would you need to run the tests of your dependencies from within your main project? Admittedly, I don't really mind either way, let's just move this forward? :-) Ping @cboden, @WyriHaximus |
|
Agreed let's more forward 👍 |
|
IIRC, this was primarily for running the component tests from the main react/react repository: https://github.com/reactphp/react/blob/master/phpunit.xml.dist#L16 |
I think we all agree we can move forward either way. Ping @cboden, what's your take on this? |
|
I do like the ability to run all tests from the main repo. That can be applied in another PR though. |
Clean up test suite and add a functional test case
autoload-devThis rather small PR serves as the basis for my other upcoming PRs.