Skip to:
Content

bbPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#2962 closed defect (bug) (fixed)

Use `get_sites()` for muiltisite PHPUnit testcase in `BBP_UnitTestCase::tearDown`

Reported by: netweb Owned by: netweb
Priority: normal Milestone: 2.6
Component: Tools - Unit Tests Version:
Severity: major Keywords: needs-patch
Cc:

Description

WordPress 4.6 deprecated wp_get_sites(), switch to the replacement get_sites()

Via ​#WP36994 ​changeset:37653

Attachments (2)

2962.diff​ (676 bytes ) - added by netweb 10 years ago.
2962.1.diff​ (2.3 KB ) - added by netweb 10 years ago.

Download all attachments as: .zip

Change History (6)

#1 @netweb
10 years ago

  • Owner set to netweb
  • Resolution → fixed
  • Status new → closed

In 6060:

Tools - Unit Tests: Use get_sites() for muiltisite PHPUnit testcase in BBP_UnitTestCase::tearDown

WordPress 4.6 deprecated wp_get_sites(), switch to the replacement get_sites() via ​#WP36994 / ​changeset:37653

Fixes #2962.

#2 @netweb
10 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed
  • Severity normal → major
  • Status closed → reopened

There's more to be done here.... Going to wait a few days for other tickets and commits to go in and revisit then

See also ​#WP37053 ​#WP36717

via ​https://wordpress.slack.com/archives/core-multisite/p1465451940000194

netweb [3:49 PM]: Much PHPUnit :boom:

netweb [3:56 PM]: Switched from wp_get_sites() to get_sites() results in Error: Cannot use object of type WP_Site as array

jeremyfelt [3:59 PM] That should be expected (need to write dev-notes). get_sites() is a replacement, but returns an array of WP_Site objects rather than the array of arrays.

jeremyfelt [3:59] So a replacement, but not a straight replacement

#3 @netweb
10 years ago

  • Resolution → fixed
  • Status reopened → closed

In 6071:

Tests: Update forum/topic/reply post type assertions for the WP_Post_Type class introduced in WordPress 4.6

Fixes #2962.

#4 @netweb
10 years ago

In 6075:

Build Tools: More targeted cleanup for multisite unit tests.

This changeset is a subset of ​buddypress:changeset:9980 and removes a previous heavy-handed workaround for deleting the first multisite user. This also resolves a fatal error Object does not implement ArrayAccess when running the tests on HHVM.

See #2962, #2981

Note: See TracTickets for help on using tickets.