givewp
givewp copied to clipboard
Refactor: Remove side effects from data provider
Issue
Tests_MISC_Functions->test_give_meta_helpers
's data provider had side effects, which caused unexpected failures when using the --filter option of PHPUnit.
Solution
- Removal of data provider side effects
Impact
This change improves test reliability and isolation, allowing more predictable execution, especially when using --filter.
Good practice
Data providers should never have side effects to guarantee the consistency and independence of the tests.