Closed wppunk closed 4 years ago
How about overwriting the exit handler in wp_die_ajax
filter?
Looks like the additional filter for $args
can help in my case. Actually, I suggest forcing 'exit' => false
in the tests.
@szepeviktor We can in tests use the filters to overwrite all handlers. What do you think about it? I mean the will be good to add this into this repository.
You can send a PR.
@szepeviktor Sounds good. Where the good place for it?
I have the next method:
So I need to write a test for the incorrect request(without
$post_id
or$user_emotion
) and success request. Such aswp_send_json
function haswp_die
at the end need some mock for this function. Do you have any idea?