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

TestCase: possibility of named sets in dataprovider #293

Closed
wants to merge 3 commits into from

Conversation

stekycz
Copy link
Contributor

@stekycz stekycz commented Mar 3, 2016

Minor features which brings easier distinguishing which data the test is failing for. Useful for larger and more complicated datasets at the input.

$data[$setName] = $set;
} else {
$data[] = $set;
}
Copy link
Member

Choose a reason for hiding this comment

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

@stekycz All original keys can be preserved in $data[], not only strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@milo Unfortunately I can't because it breaks possibility of multiple data providers. The string key must be unique because it is explicit value however two different data providers without naming returns array with indexes 0, 1, 2, ... so it results in wrong data set. You can try it on your own ;-)

Copy link
Member

Choose a reason for hiding this comment

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

Actually, the same string may replace previous dataset too.

Copy link
Contributor Author

@stekycz stekycz Apr 30, 2016

Choose a reason for hiding this comment

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

Yes it can. However the probability of that is lower then for regular array. The same string name must be specified explicitly however same array index is quite hard to find where the problem (overriding) is.

@stekycz
Copy link
Contributor Author

stekycz commented May 18, 2016

Rebased

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.

None yet

2 participants