You appear to be a bot. Output may be restricted
Description
Test: With a valid response, get_events() should return an associative array containing a location array and an events array with individual events that have Unix start/end timestamps.
Usage
Tests_Admin_wpCommunityEvents::test_get_events_valid_response();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/admin/wpCommunityEvents.php
Lines:
1 to 13 of 13
public function test_get_events_valid_response() { add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); $response = $this->instance->get_events(); $this->assertNotWPError( $response ); $this->assertSameSetsWithIndex( $this->get_user_location(), $response['location'] ); $this->assertSame( strtotime( 'next Sunday 1pm' ), $response['events'][0]['start_unix_timestamp'] ); $this->assertSame( strtotime( 'next Sunday 2pm' ), $response['events'][0]['end_unix_timestamp'] ); remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); }