Figured out that it was the @runTestsInSeparateProcesses annotation in the test class that was causing the error. Not sure why that would cause it. Once I removed it, the test completed successfully.
./vendor/bin/phpunit --group ajax
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
PHPUnit 9.5.24 #StandWithUkraine
. 1 / 1 (100%)
Time: 00:00.008, Memory: 32.00 MB
OK (1 test, 1 assertion)
Related Posts:
- ajaxurl not defined on front end
- Why does WordPress add 0 (zero) to an Ajax response?
- Saving data-URI to media library
- Nonces can be reused multiple times? Bug / Security issue?
- How can I run AJAX on a button click event?
- How-to implement admin Ajax inside an admin WP_List_Table?
- How to write testable classes in WordPress
- Empty POST data on server on AJAX request using Angular $http
- Using AJAX in FrontEnd with WordPress Plugin Boilerplate (wppb.io)
- Implement phpunit testing on a plugin
- Plugin development with unit tests
- wp_localize_script $handle
- Unit Testing a Plugin functionality with cron
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- Plugin Settings not Saving on Ajax re-ordered table
- How to post form in ajax mode and handle it in wordpress
- Using Ajax call in jQuery doesn’t work in widget
- Why is WP_Mock not used instead of WP_UnitTestCase for writing unit tests by most plugins?
- Timeout on Admin-Ajax?
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- Ajax in WordPress – path issue
- Ensure function has completed before allowing another Ajax call
- include wp-blog-header not working on MAMP
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Show special field when correct shipping is chosen
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- Woocommerce checkout update totals with datepicker
- Including the necessary functions for a custom ajax registration form
- get post attachment using ajax
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Create a new post using rest api and save featured image using an external image url
- how to search users by ajax live search
- wp.template() returns tags in Ajax response
- Storing data in wordpress database from ajax call from different website
- Unit testing a plugin with a theme dependency
- Fatal error: Uncaught Error: Call to undefined function get_option()
- template_redirect or admin-ajax.php?
- how to get context information inside my funcion
- AJAX form post returns 0
- wp_localize_script is not adding a global variable for javascript
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- Ajax is not working in a loop
- insert query on a custom table using ajax with jQuery plugin Jeditable
- How to get error object returned by wp_create_user
- Plugin AJAX Save to Custom Table
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- ajax working when function is on child theme but not in plugin page
- AJAX call to admin-ajax.php by subscriber returns home page
- Ajax function is not working on WordPress
- About a programming language starts with [closed]
- Best practice for plugin: always detect admin-ajax call?
- Workflow for new importer plugin – your advices?
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- AJAX request not routing through proxy
- Ajax on the Administration Side of plugin – returns 0
- How to do admin ajax request in a plugin for rest api
- Ajax action has 200 status but response of No response data available for this request
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- GET request return value as error instead of success
- How to control ajax calls without effecting memory of server?
- Bad request 400 using class based files
- Forbidden Error in ajax call with wordpress
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- ajax stopped working when not logged in wordpress
- ajax call return 406 not acceptable for non logged users only
- ajax response strips multidimensional array and unable to decode
- PHPUnit Testing and woocommerce Constant
- Unit Testing action hook
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Rate limiting ajax requests in WordPress
- WordPress Ajax not returning Response
- ajax-action.php can’t find added action
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- AJAX call of function containing javascript which is not loaded (Plugin development)
- Inserted data from database does not showing on front-page without referesh page?
- wp_ajax function return the html page
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- How to include files in the loop via ajax
- How to handle ajax Request in a complex-structured plugin?
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- How To do Ajax In WordPress Custom Plugin?
- PHP includes with AJAX actions
- WordPress function is not called and ajax return 0
- Ajax call not working with
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Ajax not working to insert, query and result data
- Can’t get query string in ajax call
- An adiitional function fires on my AJAX submit
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- Page reload occurs before request finishes
- PHPUnit Testing Installation Issue
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- WordPress plugin boilerplate AJAX functionality