You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing plugins/modules for legacy platforms like WordPress, Drupal < 8, or OS Commerce, it would be nice to be able to test the code. Unfortunately, they all use global functions and specify that if you want to test your code, write some sort of facade in front of the globals to mock. It would be much nicer to be able just mock the functions themselves as long as they do not exist. An example might be:
When writing plugins/modules for legacy platforms like WordPress, Drupal < 8, or OS Commerce, it would be nice to be able to test the code. Unfortunately, they all use global functions and specify that if you want to test your code, write some sort of facade in front of the globals to mock. It would be much nicer to be able just mock the functions themselves as long as they do not exist. An example might be:
The text was updated successfully, but these errors were encountered: