-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
TextUI TestRunner cannot run a non-TestSuite Test instance #3254
Comments
sebastianfeldmann
pushed a commit
to sebastianfeldmann/phpunit
that referenced
this issue
Sep 7, 2018
sebastianfeldmann
pushed a commit
to sebastianfeldmann/phpunit
that referenced
this issue
Sep 7, 2018
Make sure the 'processSuiteFilters' method is only called for 'TestSuite' objects not for 'Test' objects. To achieve this, the 'processSuiteFilters' method call got moved to an existing type check. Fix issue sebastianbergmann#3254
sebastianfeldmann
pushed a commit
to sebastianfeldmann/phpunit
that referenced
this issue
Sep 7, 2018
sebastianfeldmann
pushed a commit
to sebastianfeldmann/phpunit
that referenced
this issue
Sep 7, 2018
Make sure the 'processSuiteFilters' method is only called for 'TestSuite' objects not for 'Test' objects. To achieve this, the 'processSuiteFilters' method call got moved to an existing type check. Fix issue sebastianbergmann#3254
Merged
sebastianbergmann
pushed a commit
that referenced
this issue
Sep 7, 2018
sebastianbergmann
pushed a commit
that referenced
this issue
Sep 7, 2018
Make sure the 'processSuiteFilters' method is only called for 'TestSuite' objects not for 'Test' objects. To achieve this, the 'processSuiteFilters' method call got moved to an existing type check. Fix issue #3254
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that
TextUI/TestRunner::doRun
has an issue when passed an object that isn't aTestSuite
. If the constructor argument torun
is a non-TestSuite
Test
object, things start to break beginning with a call to$this->processSuiteFilters
, (https://github.com/sebastianbergmann/phpunit/blob/master/src/TextUI/TestRunner.php#L158) which expects aTestSuite
instance.This is at odds with the
TestRunner::doRun
type hint (which specifiesTest
), and theTestRunner::run
function itself (which appears to acceptTest
instances by design). This also means that the Example 12.5 in the manual (https://phpunit.readthedocs.io/en/7.3/extending-phpunit.html#implement-phpunit-framework-test) cannot actually work.The text was updated successfully, but these errors were encountered: