Code is Poetry.

WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2017-11-30 23:09:33 +00:00
parent ec6a089f98
commit 8f95800d52
1103 changed files with 105981 additions and 78187 deletions

View File

@@ -201,53 +201,55 @@ class Test_WP_Community_Events extends WP_UnitTestCase {
public function _http_request_valid_response() {
return array(
'headers' => '',
'body' => wp_json_encode( array(
'location' => $this->get_user_location(),
'events' => array(
array(
'type' => 'meetup',
'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
'meetup' => 'The East Bay WordPress Meetup Group',
'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Sunday 1pm' ) ),
'location' => array(
'location' => 'Oakland, CA, USA',
'country' => 'us',
'latitude' => 37.808453,
'longitude' => -122.26593,
'body' => wp_json_encode(
array(
'location' => $this->get_user_location(),
'events' => array(
array(
'type' => 'meetup',
'title' => 'Flexbox + CSS Grid: Magic for Responsive Layouts',
'url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/events/236031233/',
'meetup' => 'The East Bay WordPress Meetup Group',
'meetup_url' => 'https://www.meetup.com/Eastbay-WordPress-Meetup/',
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Sunday 1pm' ) ),
'location' => array(
'location' => 'Oakland, CA, USA',
'country' => 'us',
'latitude' => 37.808453,
'longitude' => -122.26593,
),
),
array(
'type' => 'meetup',
'title' => 'Part 3- Site Maintenance - Tools to Make It Easy',
'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
'meetup' => 'WordPress Bay Area Foothills Group',
'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ),
'location' => array(
'location' => 'Milpitas, CA, USA',
'country' => 'us',
'latitude' => 37.432813,
'longitude' => -121.907095,
),
),
array(
'type' => 'wordcamp',
'title' => 'WordCamp Kansas City',
'url' => 'https://2017.kansascity.wordcamp.org',
'meetup' => null,
'meetup_url' => null,
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Saturday' ) ),
'location' => array(
'location' => 'Kansas City, MO',
'country' => 'US',
'latitude' => 39.0392325,
'longitude' => -94.577076,
),
),
),
array(
'type' => 'meetup',
'title' => 'Part 3- Site Maintenance - Tools to Make It Easy',
'url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/events/237706839/',
'meetup' => 'WordPress Bay Area Foothills Group',
'meetup_url' => 'https://www.meetup.com/Wordpress-Bay-Area-CA-Foothills/',
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Wednesday 1:30pm' ) ),
'location' => array(
'location' => 'Milpitas, CA, USA',
'country' => 'us',
'latitude' => 37.432813,
'longitude' => -121.907095,
),
),
array(
'type' => 'wordcamp',
'title' => 'WordCamp Kansas City',
'url' => 'https://2017.kansascity.wordcamp.org',
'meetup' => null,
'meetup_url' => null,
'date' => date( 'Y-m-d H:i:s', strtotime( 'next Saturday' ) ),
'location' => array(
'location' => 'Kansas City, MO',
'country' => 'US',
'latitude' => 39.0392325,
'longitude' => -94.577076,
),
),
),
) ),
)
),
'response' => array(
'code' => 200,
),