You appear to be a bot. Output may be restricted
Description
Testing the error messaging for ajax_load_available_items
Usage
Tests_Ajax_CustomizeMenus::test_ajax_load_available_items_error_messages( $post_args, $expected_results );
Parameters
- $post_args
- ( array ) required – POST args.
- $expected_results
- ( mixed ) required – Expected results.
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/ajax/CustomizeMenus.php
Lines:
1 to 20 of 20
public function test_ajax_load_available_items_error_messages( $post_args, $expected_results ) { $_POST = array_merge( array( 'action' => 'load-available-menu-items-customizer', 'customize-menus-nonce' => wp_create_nonce( 'customize-menus' ), ), $post_args ); // Make the request. $this->make_ajax_call( 'load-available-menu-items-customizer' ); // Get the results. $response = json_decode( $this->_last_response, true ); $this->assertSame( $expected_results, $response ); }