Comments (2)
Hi Sal,
thanks for your interest and your effort.
Please note that there's already a way to do this.
You do:
Brain\Monkey\Functions::when( '__' )->returnArg();
ans that's it.
It works with all the functions, so no need to create a mock for each of the thousands of WordPress functions...
Please refers to documentation https://brain-wp.github.io/BrainMonkey/docs/functions-when.html
from brainmonkey.
Wonderful, thank you.
My apologies for not reading the documentation more closely.
Thanks for putting me back on the right path.
Have a great day.
from brainmonkey.
Related Issues (20)
- Release 2.6.1 ? HOT 15
- The file that defines <Namespace::method> was included earlier than Patchwork. This is likely a result of an improper setup; see readme for details. HOT 2
- Add more utilities to stub WordPress functions HOT 3
- Old site? HOT 4
- A never-returning function must not return in ... HOT 10
- Best approach to mock functions after require_once. HOT 2
- Issue with mocking my functions (Wordpress) HOT 4
- Expects not functioning HOT 2
- How to set expectations for inside anonymous functions HOT 2
- Provide test case classes for PHPUnit HOT 6
- Packagist is serving version 2.5.0 ? HOT 1
- has_filter/has_action return true instead of the hook priority HOT 7
- WP: adding mocks for some miscellaneous functions HOT 1
- Why expect function works unexpectedly? HOT 4
- Mocks for deep arguments in the function doesn't work HOT 5
- Testing w/o class or class instantiation within plugin HOT 2
- Adding Monkey\setUp() and tearDown() fails otherwise passing tests HOT 3
- has_filter doen't work with type hints with namespaces HOT 10
- Correct use of patchwork.json to redefine internal functions? HOT 4
- Docs site not up-to-date HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brainmonkey.