Tribe__Events__Main::POSTTYPE, 'posts_per_page' => -1 ); return get_posts(array_merge($default_args, $args)); } } // Mock essential WordPress functions if needed for testing if (!function_exists('wp_verify_nonce')) { function wp_verify_nonce($nonce, $action = -1) { return true; // Always verify in test environment } } if (!function_exists('wp_create_nonce')) { function wp_create_nonce($action = -1) { return 'test_nonce'; } } // Add test helper functions function create_test_event($args = array()) { $default_args = array( 'post_type' => Tribe__Events__Main::POSTTYPE, 'post_title' => 'Test Event', 'post_status' => 'publish' ); return wp_insert_post(array_merge($default_args, $args)); }