Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#39241 closed defect (bug) (fixed)

Add more unit tests for the custom header feature

Reported by: bradyvercher's profile bradyvercher Owned by: obenland's profile obenland
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7
Component: Themes Keywords: has-patch commit
Focuses: Cc:

Description

The custom header functionality is largely untested. I introduced some tests in #38639, but they got overlooked while focusing on getting 4.7 out the door, so I'd like to reintroduce them for inclusion.

Attachments (1)

39241.diff (9.2 KB) - added by bradyvercher 8 years ago.

Download all attachments as: .zip

Change History (8)

@bradyvercher
8 years ago

#1 @bradyvercher
8 years ago

  • Keywords has-patch added

39241.diff contains tests introduced in #38639 and they've at least had a cursory review here.

It doesn't look like the patch keeps binary files, so the video file will need to be downloaded from this repo and saved to tests/phpunit/data/images/video.mp4 to make the tests pass -- I wasn't sure if a new directory should be created for videos instead. According to the license, that file should be public domain:

To the extent possible under law, the author has waived all copyright and related or neighboring rights to this work.

#2 @joemcgill
8 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.8
  • Owner set to joemcgill
  • Status changed from new to accepted
  • Version set to 4.7

Thanks for following up on these @bradyvercher. The tests look good and are passing here.

This ticket was mentioned in Slack in #core by flixos90. View the logs.


7 years ago

This ticket was mentioned in Slack in #core by obenland. View the logs.


7 years ago

#5 @obenland
7 years ago

  • Milestone changed from 4.8 to Future Release

#6 @obenland
7 years ago

  • Milestone changed from Future Release to 4.8
  • Owner changed from joemcgill to obenland

#7 @obenland
7 years ago

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

In 40825:

Themes: More unit tests for Custom Header

Custom Header functionality is largely untested. This adds tests for existing
behavior as well as changes introduced in [39227].

Props bradyvercher.
See #38639.
Fixes #39241.

Note: See TracTickets for help on using tickets.