You appear to be a bot. Output may be restricted
Description
Test: get_cached_events()
should return the same data as get_events(), including Unix start/end timestamps for each event.
Usage
Tests_Admin_wpCommunityEvents::test_get_cached_events_valid_response();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/admin/wpCommunityEvents.php
Lines:
1 to 15 of 15
public function test_get_cached_events_valid_response() { add_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); $this->instance->get_events(); $cached_events = $this->instance->get_cached_events(); $this->assertNotWPError( $cached_events ); $this->assertSameSetsWithIndex( $this->get_user_location(), $cached_events['location'] ); $this->assertSame( strtotime( 'next Sunday 1pm' ), $cached_events['events'][0]['start_unix_timestamp'] ); $this->assertSame( strtotime( 'next Sunday 2pm' ), $cached_events['events'][0]['end_unix_timestamp'] ); remove_filter( 'pre_http_request', array( $this, '_http_request_valid_response' ) ); }