Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#43982 closed enhancement (fixed)

The test suite shouldn't assume that the data directory exists

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 4.9.7 Priority: low
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

It's possible to bundle the WordPress unit test framework inside a project by including the contents of the tests/phpunit/includes directory.

However the test framework makes an assumption that the tests/phpunit/data/themedir1 directory exists and causes a PHP notice to be triggered:

Notice: tests/phpunit/wordpress-tests-lib/includes/../data/themedir1 is not readable in wp-includes/theme.php on line 471

Attachments (1)

43982.diff (749 bytes) - added by johnbillion 7 years ago.

Download all attachments as: .zip

Change History (8)

@johnbillion
7 years ago

#1 @johnbillion
7 years ago

  • Keywords has-patch added; needs-patch removed

#2 @netweb
7 years ago

  • Keywords commit added

#3 @desrosj
7 years ago

  • Milestone changed from 4.9.7 to 4.9.8

Moving all tickets in 4.9.7 to 4.9.8.

#4 @desrosj
7 years ago

  • Milestone changed from 4.9.8 to 4.9.7

#5 @johnbillion
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 43315:

Build/Test Tools: Allow the unit test framework to be used without the data directory in place.

Fixes #43982

#6 @johnbillion
7 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @johnbillion
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43316:

Build/Test Tools: Allow the unit test framework to be used without the data directory in place.

Fixes #43982

Merges [43315] to the 4.9 branch.

Note: See TracTickets for help on using tickets.