PHP Class EP_Test_Base

Inheritance: extends WP_UnitTestCase
Mostra file Open project: 10up/elasticpress Class Usage Examples

Protected Properties

Property Type Description
$applied_filters array Helps us keep track of applied filters
$fired_actions array Helps us keep track of actions that have fired
$plugin_path string Stores the root path for the plugin

Public Methods

Method Description
__construct ( ) Prevents weird MySQLi error.
action_delete_post ( ) Helper function to test whether a post has been deleted off ES
action_sync_on_meta_update ( ) Helper function to test whether a meta sync has happened
action_sync_on_transition ( ) Helper function to test whether a sync has happened
action_wp_query_search ( ) Helper function to test whether a EP search has happened
filter_post_sync_args ( $post_args ) Helper function to check post sync args
setup_test_post_type ( ) Setup a few post types for testing

Method Details

__construct() public method

Prevents weird MySQLi error.
Since: 1.0
public __construct ( )

action_delete_post() public method

Helper function to test whether a post has been deleted off ES
Since: 1.0
public action_delete_post ( )

action_sync_on_meta_update() public method

Helper function to test whether a meta sync has happened
Since: 2.0

action_sync_on_transition() public method

Helper function to test whether a sync has happened
Since: 1.0

filter_post_sync_args() public method

Helper function to check post sync args
Since: 1.0
public filter_post_sync_args ( $post_args )

setup_test_post_type() public method

Setup a few post types for testing
Since: 1.0

Property Details

$applied_filters protected_oe property

Helps us keep track of applied filters
Since: 1.0
protected array $applied_filters
return array

$fired_actions protected_oe property

Helps us keep track of actions that have fired
Since: 1.0
protected array $fired_actions
return array

$plugin_path protected_oe property

Stores the root path for the plugin
protected string $plugin_path
return string