Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34790 closed defect (bug) (fixed)

Fix unit tests after [35739]

Reported by: ocean90's profile ocean90 Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: General Keywords: needs-patch
Focuses: Cc:

Description

Looks like we have some theme-dependent tests which are failing now.

https://travis-ci.org/aaronjorbin/develop.wordpress/jobs/93252288

Attachments (1)

34790.diff (7.3 KB) - added by joemcgill 9 years ago.
Fix responsive image tests after Twenty Sixteen

Download all attachments as: .zip

Change History (7)

#1 @ocean90
9 years ago

cc: @joemcgill, @obenland, @westonruter

#2 follow-up: @danielbachhuber
9 years ago

I might suggest not loading a theme when running core unit tests, to prevent the active theme from ever affecting expected core behavior.

#3 @obenland
9 years ago

https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/customize/widgets.php?rev=35724#L39

The easy way would to change the filter to twentysixteen_setup, or we could work on that @todo like Daniel mentioned.

@joemcgill
9 years ago

Fix responsive image tests after Twenty Sixteen

#4 @joemcgill
9 years ago

34790.diff modifies the responsive image tests that were failing after the switch to Twenty Sixteen as the default theme. If we truly want to be able to run these tests without any interference from whichever theme is loaded, we'd need to mock all of the expected data for image uploads, rather than using the current factory methods to create actual attachments from uploaded data.

#5 in reply to: ↑ 2 @westonruter
9 years ago

Replying to danielbachhuber:

I might suggest not loading a theme when running core unit tests, to prevent the active theme from ever affecting expected core behavior.

+1. See #31550. Unfortunately I won't be at a keyboard until Friday night (PST) at the earliest.

#6 @wonderboymusic
9 years ago

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

In 35751:

Unit Tests: fix responsive image unit tests. Correct the logic in video shortcode unit test for width.

Props joemcgill, wonderboymusic.
Fixes #34790.

Note: See TracTickets for help on using tickets.