Traits_Trigger_Recipe_Filters_Provider


Source Source

File: tests/wpunit/data-providers/Traits_Trigger_Recipe_Filters_Provider.php

class Traits_Trigger_Recipe_Filters_Provider {
	public function get_number_conditions_provider() {
		// Use service like https://jsonformatter.curiousconcept.com/ and paste the following JSON string to inspect.
		return '{"88":{"ID":"88","post_status":"publish","recipe_type":"user","triggers":[{"ID":"89","post_status":"publish","menu_order":"0","meta":{"automator_duplicated_from":"86","code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: greater or equal to}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> greater or equal to<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"greater or equal to","NUMBERCOND":">=","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"90","post_status":"publish","menu_order":"10","meta":{"automator_duplicated_from":"87","code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false},"85":{"ID":"85","post_status":"publish","recipe_type":"user","triggers":[{"ID":"86","post_status":"publish","menu_order":"0","meta":{"automator_duplicated_from":"83","code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: less or equal to}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> less or equal to<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"less or equal to","NUMBERCOND":"<=","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"87","post_status":"publish","menu_order":"10","meta":{"automator_duplicated_from":"84","code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false},"82":{"ID":"82","post_status":"publish","recipe_type":"user","triggers":[{"ID":"83","post_status":"publish","menu_order":"0","meta":{"automator_duplicated_from":"80","code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: not equal to}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> not equal to<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"not equal to","NUMBERCOND":"!=","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"84","post_status":"publish","menu_order":"10","meta":{"automator_duplicated_from":"81","code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false},"79":{"ID":"79","post_status":"publish","recipe_type":"user","triggers":[{"ID":"80","post_status":"publish","menu_order":"0","meta":{"automator_duplicated_from":"77","code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: equal to}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> equal to<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"equal to","NUMBERCOND":"=","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"81","post_status":"publish","menu_order":"10","meta":{"automator_duplicated_from":"78","code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false},"76":{"ID":"76","post_status":"publish","recipe_type":"user","triggers":[{"ID":"77","post_status":"publish","menu_order":"0","meta":{"automator_duplicated_from":"74","code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: less than}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> less than<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"less than","NUMBERCOND":"<","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"78","post_status":"publish","menu_order":"10","meta":{"automator_duplicated_from":"75","code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false},"70":{"ID":"70","post_status":"publish","recipe_type":"user","triggers":[{"ID":"74","post_status":"publish","menu_order":"0","meta":{"code":"MPC_QUIZ_SCORE","integration":"MPC","uap_trigger_version":"4.5.0.2","add_action":"mepr-event-mpca-quiz-attempt-completed","integration_name":"MemberPress Courses","sentence":"A user achieves a score {{greater than, less than or equal to:NUMBERCOND}} a {{value:QUIZSCORE}} on a {{quiz:MPC_QUIZ}} {{a number of:NUMTIMES}} time(s)","sentence_human_readable":"A user achieves a score {{Condition: greater than}} a {{Required score: 65}} on a {{Quiz: Quiz 1}} {{Number of times: 1}} time(s)","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">A user achieves a score <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMBERCOND\\" data-options-id=\\"NUMBERCOND\\"><span class=\\"item-title__token-label\\">Condition:<\\/span> greater than<\\/span><span class=\\"item-title__normal\\"> a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"QUIZSCORE\\" data-options-id=\\"QUIZSCORE\\"><span class=\\"item-title__token-label\\">Required score:<\\/span> 65<\\/span><span class=\\"item-title__normal\\"> on a <\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"MPC_QUIZ\\" data-options-id=\\"MPC_QUIZ\\"><span class=\\"item-title__token-label\\">Quiz:<\\/span> Quiz 1<\\/span><span class=\\"item-title__token item-title__token--filled\\" data-token-id=\\"NUMTIMES\\" data-options-id=\\"NUMTIMES\\"><span class=\\"item-title__token-label\\">Number of times:<\\/span> 1<\\/span><span class=\\"item-title__normal\\"> time(s)<\\/span><\\/div>","NUMBERCOND_readable":"greater than","NUMBERCOND":">","QUIZSCORE":"65","MPC_QUIZ_readable":"Quiz 1","MPC_QUIZ":"20"},"tokens":[]}],"actions":[{"ID":"75","post_status":"publish","menu_order":"10","meta":{"code":"SENDEMAIL","integration":"EMAILS","uap_action_version":"4.5.0.2","integration_name":"Emails","sentence":"Send an email to {{email address:EMAILTO}}","sentence_human_readable":"Send an email to {{email address}}","sentence_human_readable_html":"<div><span class=\\"item-title__normal\\">Send an email to <\\/span><span class=\\"item-title__token\\" data-token-id=\\"EMAILTO\\" data-options-id=\\"EMAILTO\\"><span><span class=\\"item-title__token-label\\">To: <\\/span><span class=\\"uap-text-with-tokens\\"><span class=\\"uap-token\\"><uo-icon id=\\"bolt\\"><\\/uo-icon><span class=\\"uap-token__name\\">Site name<\\/span><\\/span><\\/span><\\/span><\\/span><\\/div>","EMAILCONTENTTYPE_readable":"HTML","EMAILCONTENTTYPE":"html","EMAILFROM":"{{admin_email}}","EMAILFROMNAME":"{{site_name}}","EMAILTO":"{{site_name}}","EMAILCC":"","EMAILBCC":"","EMAILSUBJECT":"{{site_name}}","EMAILBODY":"<!DOCTYPE html>\\n<html>\\n<head>\\n<\\/head>\\n<body>\\n<p>{{site_name}}<\\/p>\\n<\\/body>\\n<\\/html>"}}],"closures":[],"completed_by_current_user":false}}';
	}
}

Methods Methods