-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Be strict about data providers having redundant data #6213
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
Be strict about data providers having redundant data #6213
Conversation
No. |
Thank you! |
@sebastianbergmann you are so fast 👍🏼 Even too fast: #6215 |
I have "downgraded" this from an error to a warning in 7f1969a. |
Cool. The warning will be on the test case level, not at the test method level, as the error was. |
The warning can be seen here: https://github.com/sebastianbergmann/phpunit/blob/main/tests/end-to-end/data-provider/too-many-arguments.phpt#L23 |
This might have a small regression for ... /**
* tests failure messages for assertions
*
* @param string $assertion Assertion method
* @param string $message Expected failure message
* @param string $url URL to test
* @param mixed ...$rest
*/
#[DataProvider('assertionFailureMessagesProvider')]
public function testAssertionFailureMessages($assertion, $message, $url, ...$rest): void
{
$this->expectException(AssertionFailedError::class);
$this->expectExceptionMessage($message);
Security::setSalt($this->key);
$this->get($url);
call_user_func_array($this->$assertion(...), $rest);
} If there is a ...$var maybe the warning should be skipped as it is intentional?
|
Maybe a
And if true we just skip? |
@dereuromark Please open a new issue if you think you found a bug/regression. Thank you. |
It is regression, I've raised the PR with the fix: #6228 |
Closes #6211
Should this be hidden behind a config option?
Should it make the test risky/with a warning rather than producing error?