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

Unexpected @depends behaviour #9

Closed
ondrejmirtes opened this issue Aug 19, 2010 · 2 comments
Closed

Unexpected @depends behaviour #9

ondrejmirtes opened this issue Aug 19, 2010 · 2 comments

Comments

@ondrejmirtes
Copy link

When I have a tree of depending tests:

  • testBasic
    • testBar($a) (depending on testBasic)
    • testLorem($a) (depending on testBasic)
      • testFoo($a) (depending on testLorem)
    • testIpsum($a) (depending on testBasic)

They are executed linearily and still the same object is passed as argument, so for example at testIpsum, I got the object with changes from testLorem). Which I consider as unexpected and not wanted behaviour.

I think that the order of executed tests should be tree-like, everytime with a new object:

running testBasic: testBasic
running testBar: testBasic - testBar
running testLorem: testBasic - testLorem
running testFoo: testBasic - testLorem - testFoo
running testIpsum - testBasic - testIpsum

@sebastianbergmann
Copy link
Owner

The documentation reads "PHPUnit does not change the order in which tests are executed, you have to ensure that the dependencies of a test can actually be met before the test is run.".

That said, please have a look at issues #10 and #11.

@ondrejmirtes
Copy link
Author

I wasn't complaining about the order of the executed tests, but about the fact described in #11. Thank you very much!

This issue was closed.
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

No branches or pull requests

2 participants