Skip to content
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

Allow duplicate steps on same method #1428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

uuf6429
Copy link

@uuf6429 uuf6429 commented Apr 8, 2023

Fixes #1425

$this->theOutputShouldContain($text);
$this->itShouldFail($success);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the order of this and the check below since comparing the output first is more informative and tends to be more helpful when debugging tests.

if (isset($patterns[$callee->getPattern()])) {
continue;
}
$patterns[$callee->getPattern()] = true;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using [$pattern => true] & isset() since it should be faster than in_array, at the cost of readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Same step pattern, different step types are not allowed; additionally step type is ignored in feature files
1 participant