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?
- Unit tests – Dealing with dependencies
- How-to implement admin Ajax inside an admin WP_List_Table?
- How to write testable classes in WordPress
- PHPUnit testing WordPress Plugin
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- 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
- Unit testing to simulate the loop
- Build path for a custom portfolio plugin
- What is the best way to do unit tests for your plugin in 2018 [closed]
- Plugin development with unit tests
- Using AJAX in a plugin to submit form – REALLY confused
- wp_localize_script $handle
- Unit testing wordpress plugins with plugin options
- Install and load additional plugins when running unit tests
- Unit Testing a Plugin functionality with cron
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- Adding callback function for wp_ajax_ has no effect
- PHPUnit test plugin activation
- get all products of one category
- Get returned variable from a function to add_shortcode function
- 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
- WP_LOCALIZE_SCRIPT doesn’t work
- Why is WP_Mock not used instead of WP_UnitTestCase for writing unit tests by most plugins?
- DataBase connection problem with PHPUnit and WordPress
- Timeout on Admin-Ajax?
- Ajax +wordpress onClick link redirect to new page and create html content
- AJAX request not routing through proxy
- Get cat parameter from admin-ajax
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- 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
- Jquery php request is returning a weird result
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Posts form with AJAX request – Plugin development
- 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
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- ajax stopped working when not logged in wordpress
- ajax call return 406 not acceptable for non logged users only
- Does $this context change in an AJAX callback?
- 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)
- Performing ajax request in wordpress
- 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
- ajax multiple Values
- How to include files in the loop via ajax
- How to handle ajax Request in a complex-structured plugin?
- Using JavaScript in WordPress page to call for server data using AJAX
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- Ajax Response Error | just getting error as the response
- How To do Ajax In WordPress Custom Plugin?
- PHP includes with AJAX actions
- admin-ajax.php returns “No Script Kiddies!” sometimes
- WordPress function is not called and ajax return 0
- Ajax call not working with
- Ajax functionality not being called under wordpress plugin
- Array/List Edit in Backend
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Ajax not working to insert, query and result data
- WP Cron as Fast as WordPress AJAX?
- WordPress plugin: admin-ajax.php not passing data to custom function
- Can’t get query string in ajax call
- Ajax url value to pass ‘variable’ to use in query
- Ajax functions – no access to wp-admin.php only online
- 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
- Return custom product in ajax call loop
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- WordPress plugin boilerplate AJAX functionality
- Issue in Creating Dynamic URL in custom wordpress plugin
- Does a wordpress custom plugin is fired by default on php theme ajax request?
- Can’t delete reported post