Replies: 2 comments
-
I used to shared tests in PHPUnit via traits, sharing data providers and generic test implementations using traits:
So, if I need to use that trait helper ( As you can see, you can avoid a lot of code duplication in your tests with this approach. I think that is what you, and I, want, but in Pest PHP. I'll check how to do this in Pest. I'll be in touch. 😊 |
Beta Was this translation helpful? Give feedback.
-
Any solution to this? Seems a shortcoming of Pest where we can't use it like a class and extend or add traits? |
Beta Was this translation helpful? Give feedback.
-
My test file looks like the example below.
Is it possible to share some tests with other test files?
Example:
($this->dummyData should take different data in each file. or some other way i need to be able to access this data.)
or
groupEach
,groupAll
etc:Thanks to everyone who contributed to this amazing package!
Edit:
or something like:
Beta Was this translation helpful? Give feedback.
All reactions