Closed bpolaszek closed 4 years ago
This is indeed a bug: https://github.com/pestphp/pest/blob/283d8f3e03956cbee210d69edd5ad13690078723/src/Datasets.php#L95.
Some combinations in that $combinations variable have the same short description, making pest think that the test is the same.
Brilliant! Tested on dev-master
:
PASS Tests\Unit\Security\TopicMatcher\Publish\TopicMatcherTest
✓ it contains 44 combinations
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #1
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #1
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #2
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #2
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #3
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #3
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #4
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, true) #1
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, true) #1
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, true) #2
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, true) #2
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, true) #3
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, true) #3
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, true) #4
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #5
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #4
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #6
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #5
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #7
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #6
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), true, false) #8
✓ Topic can be updated only when authorized with ('/foo/bar', Lcobucci\JWT\Token Object (...), false, false) #7
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #1
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, false) #1
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #2
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, false) #2
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #3
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, false) #3
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #4
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #1
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, true) #1
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #2
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #5
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #3
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, true) #2
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #4
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, true) #3
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #5
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #6
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, true) #6
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #7
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, false) #4
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), true, false) #8
✓ Topic can be updated only when authorized with ('/foo/baz', Lcobucci\JWT\Token Object (...), false, false) #5
✓ all combinations have been tested
Thank you @fetzi @nunomaduro for your reactivity! 🙏
Hey there,
First, thank you for the awesome work on Pest! This is the 1st time I use it on a project and it's a real delight.
However, I noticed that sometimes, for an unknown reason, the whole dataset is not entirely traversed when using the
with()
method.Example here:
$combinations->asArray()
returns a dataset of44
combinations (verified through that first test), but only the8th
first ones are run, as if the others simply didn't exist.Here's the full output of the test:
Any ideas?
Thank you, Ben
PS: Running Pest 0.2 (used to fail also on 1.x) on PHP 7.4.