Mock a dependency of a WP_REST_Controller class
Related Posts:
- Unit testing for plugin development
- Vagrant script to setup all the common PHP / WordPress version combinations
- Unit tests – Dealing with dependencies
- PHPUnit testing WordPress Plugin
- How to check WordPress website username and password is correct
- WordPress REST API call generates nonce twice on every call
- How to: Rest endpoint returning empty object
- Custom endpoint that returns an xml
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- Rest Api How to get results of child categories with one api call
- Sample — test — data for large WordPress install
- Why is WP_Mock not used instead of WP_UnitTestCase for writing unit tests by most plugins?
- WP rest api v2 posts filter by ‘search’ & ‘category_name’ not working
- What method to use to call a REST API?
- PHP logging framework to be used with WordPress
- Best way to notify WordPress plugin users of new release candidates for beta testing?
- Plugin development: How many plugin and WordPress version combinations to support?
- WP REST API V2 – Add user data to response
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- How to get results of subcategories also?(WP Rest Api v2)
- Amending REST API function without deactivate/activate plugin every time changes is made
- Create a new post using rest api and save featured image using an external image url
- Adding custom end points, No error line
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- Secure REST with nonce works only when not logged
- How to do POST request with WP REST API v2 to custom table?
- rest_no_route on custom API endpoint wordpress
- Custom Rest Endpoint: Post/Put/Patch not working
- Can’t retrieve body params from PUT endpoint using formdata
- Do I need to create an endpoint?
- WordPress Rest API with rest_do_request, possible race condition?
- How to use apiFetch to get author information in Gutenberg properly?
- update_callback is not working in register_rest_field
- REST Endpoint API 404
- Allow REST API Endpoint to specific user and hide from public
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- How to do admin ajax request in a plugin for rest api
- Attaching Image-file to userId
- Query String Filtering API
- Custom plugin & calling REST api of wordpress instance the plugins is running on
- GET request return value as error instead of success
- How to query a nested field in wordpress api using _fields param
- Get Custom taxonomy parent with wordpress REST API
- register_meta not showing custom post type metabox data in rest api
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Securing custom rest API endpoints with public access from PWA
- WP_Query not ordering correctly
- 403 error rest_’cookie_invalid_nonce’ on API Request
- Adding Amchart Interface to WordPress API
- PHPUnit Testing and woocommerce Constant
- WC REST API Error Handling
- Initializing rest endpoint issue
- How can I measure CPU and RAM used by my theme or plugin
- Multisite and the JSON REST API: How to?
- React in plugins: REST endpoints vs. regular functions
- Testing Plugins for Multisite
- Query only title/field/featured media of posts [closed]
- WP API users per page
- Best place to keep files that are called by cron jobs?
- Is it safe to use PUT and DELETE requests
- Is it possible to make WordPress as a RESTful app?
- oneOf two possible objects in WP REST API?
- How to update WordPress Plugins in your own maintance application?
- Extend Plugin that creates an endpoint for GET request to also accepts POST requests
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Rest Api WordPress
- External api call using wordpress
- Does WP REST API cache internally executed (rest_do_request) requests?
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- REST API error in block editor for custom templates
- How to get locale within WP REST Request?
- ACF – programmatically install and activate in pipeline to automate testing for custom plugin development?
- Execute callback after REST API request completes + Response is sent
- How to boost WP custom post REST API GET queries by custom taxonomies
- Change the_title() of a page dynamically
- Adding more options to the instance of an image. (Attachment Display Settings)
- Trouble with Transient API when W3TC is activated [closed]
- Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
- set_sale_price in WooCommerce [closed]
- Adding extra pages to plugin that shouldn’t appear in the sidebar
- jquery document ready function not being called [closed]
- Custom plugin icon not showing up
- How to export post meta with images in wordpress
- Parse form values before sending to options.php
- My WordPress plugin cannot load my JavaScript file
- Show error message after exception handled
- WP Cron being triggered but not working as expected
- Plugin Options Array Set to Undefined
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- I am trying to make a page in the admin section similar to the appearance of the Profile page for users
- unregister_setting() vs delete_option() for plugin update
- How do I get variables from my plugin’s settings page?
- get Woocommerce product format json for WP_Query
- Add quick edit functionnality to plugin table
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- remove different admin menu for specific users
- add pagination to wp_remote_get
- How to get option values without requiring wp-load?
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php