PluginProbe
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings / 6.0.7
MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings v6.0.7
7.2 7.1.2 7.1.1 7.1 7.0.4 7.0.6 7.0.7 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 6.3.1 trunk 5.7.3 5.7.5 5.8.1 5.8.2 5.8.3 5.8.4 5.8.6 6.0.4 6.0.5 6.0.7 All 35 releases
mlsimport / tests / bootstrap.php

bootstrap.php in MLSImport: IDX Plugin & MLS Plugin for Real Estate Listings 6.0.7, at tests/bootstrap.php

50 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Basic stubs for WordPress functions used in tests
3
4 if ( ! function_exists( 'delete_transient' ) ) {
5 $GLOBALS['deleted_transients'] = [];
6 function delete_transient( $name ) {
7 $GLOBALS['deleted_transients'][] = $name;
8 return true;
9 }
10 }
11
12 if ( ! function_exists( 'delete_option' ) ) {
13 $GLOBALS['deleted_options'] = [];
14 function delete_option( $name ) {
15 $GLOBALS['deleted_options'][] = $name;
16 return true;
17 }
18 }
19
20 if ( ! function_exists( 'sanitize_text_field' ) ) {
21 function sanitize_text_field( $text ) {
22 return trim( strip_tags( $text ) );
23 }
24 }
25
26 if ( ! function_exists( 'wp_unslash' ) ) {
27 function wp_unslash( $text ) {
28 return stripslashes( $text );
29 }
30 }
31
32 if ( ! function_exists( 'add_action' ) ) {
33 $GLOBALS['actions_called'] = [];
34 function add_action( $hook, $callback, $priority = 10, $accepted_args = 1 ) {
35 $GLOBALS['actions_called'][] = func_get_args();
36 }
37 }
38
39 if ( ! function_exists( 'add_filter' ) ) {
40 $GLOBALS['filters_called'] = [];
41 function add_filter( $hook, $callback, $priority = 10, $accepted_args = 1 ) {
42 $GLOBALS['filters_called'][] = func_get_args();
43 }
44 }
45
46 require __DIR__ . '/../includes/class-mlsimport-loader.php';
47 require __DIR__ . '/../includes/class-mlsimport-activator.php';
48 require __DIR__ . '/../includes/class-mlsimport-deactivator.php';
49 require __DIR__ . '/../includes/help_functions.php';
50