• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress develop tests

WordPress develop tests

WordPress develop tests a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Tests_Admin_wpCommunityEvents::_http_request_valid_response() – Simulates an HTTP response with valid location and event data.

You appear to be a bot. Output may be restricted

Description

Simulates an HTTP response with valid location and event data.

Usage

$array = Tests_Admin_wpCommunityEvents::_http_request_valid_response();

Parameters

Returns

array A mock HTTP response with valid data.

Source

File name: wordpress-develop-tests/phpunit/tests/admin/wpCommunityEvents.php


Lines:

1 to 17 of 17
  public function _http_request_valid_response() {
    return array(
      'headers'  => '',
      'body'     => wp_json_encode(
        array(
          'location' => $this->get_user_location(),
          'events'   => $this->get_valid_events(),
        )
      ),
      'response' => array(
        'code' => 200,
      ),
      'cookies'  => '',
      'filename' => '',
    );
  }
 

 View on GitHub

Published: 20th March 2022 | Last updated: 20th March 2022

Primary Sidebar

Information

Function name: Tests_Admin_wpCommunityEvents::_http_request_valid_response
Class ref: Tests_Admin_wpCommunityEvents
Plugin ref: WordPress develop tests
Version: 5.9.3
Sourcefile: phpunit/tests/admin/wpCommunityEvents.php
File ref: phpunit/tests/admin/wpCommunityEvents.php
Deprecated?: No
API Letters: A,H,T,W

Footer

WordPress develop tests
WordPress develop tests
WordPress develop tests a2z
WordPress 6.4.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  develop.wp-a2z.org
© Copyright WordPress develop tests 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites