Skip to:
Content

BuddyPress.org

Opened 8 years ago

Closed 8 years ago

#7241 closed defect (bug) (fixed)

BP tests should reset page mappings before each test

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Cc:

Description

https://core.trac.wordpress.org/changeset/38398 broke our tests. Previously, we were creating our page mappings in setUpBeforeClass(), but now WP is wiping all of this committed data out between tests.

It's probably better practice, if slightly slower, to do this setup before each test anyway.

Change History (1)

#1 @boonebgorges
8 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 11055:

Tests: Set up page mappings in setUp() rather than setUpBeforeClass().

Since https://core.trac.wordpress.org/changeset/38398, wp_posts data
that has been committed will be deleted by WP_UnitTestCase after each
test. So we need to ensure that the data exists before each test.

Fixes #7241.

Note: See TracTickets for help on using tickets.