Run PHPUnit Tests in Certain Order

前端 未结 8 1407
悲哀的现实
悲哀的现实 2020-12-04 15:20

Is there a way to get the tests inside of a TestCase to run in a certain order? For example, I want to separate the life cycle of an object from creation to use

相关标签:
8条回答
  • 2020-12-04 15:54

    PHPUnit allows the use of '@depends' annotation which specifies dependent test cases and allows passing arguments between dependent test cases.

    0 讨论(0)
  • 2020-12-04 16:07

    If you want your tests to share various helper objects and settings, you can use setUp(), tearDown() to add to the sharedFixture property.

    0 讨论(0)
提交回复
热议问题