Fix circular dependency detection in FixtureDependencySorter#28
Open
Fix circular dependency detection in FixtureDependencySorter#28
FixtureDependencySorter#28Conversation
Collaborator
|
can you a add test case to |
Member
Author
|
Okay, it seems like this only happens if you do crazy stuff like adding two fixtures of the same class, which is not really supported by this bundle anyway. What I was trying to do when I stumbled upon this was to create “configurable” fixtures. They were wrapped in a decorator that contained the actual fixture class along with its configuration. This decorator was then passed instead of the fixture, so I had many objects of this class. I'm not entirely sure if this is a good idea, though 😉 So if you use this bundle as intended, this shouldn't be an issue. |
92976e4 to
9205884
Compare
If a fixture had no dependencies, it was not removed from the “checking” property.
This commit introduces a test to verify the sorting behavior when multiple fixtures of the same class are provided. It ensures that the sorter maintains the correct order and handles such cases appropriately.
9205884 to
7331bdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a fixture had no dependencies, it was not removed from the
$checkingproperty.Also, the circular dependency tracking is improved by using a map instead of a list.