-
-
Notifications
You must be signed in to change notification settings - Fork 72
TestCase: possibility of named sets in dataprovider #293
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
Conversation
$data[$setName] = $set; | ||
} else { | ||
$data[] = $set; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ;-)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
8e0580b
to
8addd5a
Compare
8addd5a
to
bb4246a
Compare
bb4246a
to
6a5f7a3
Compare
Rebased |
20198c1
to
1b583e9
Compare
715ed4e
to
334dc33
Compare
c7e8a12
to
df5e87f
Compare
b9711f5
to
3f273cf
Compare
ee525b7
to
6ca248e
Compare
37f5151
to
c3bd1b2
Compare
f2dae8a
to
20b7c0b
Compare
e9c3f27
to
666cb04
Compare
Minor features which brings easier distinguishing which data the test is failing for. Useful for larger and more complicated datasets at the input.