Skip to content

Commit

Permalink
Set $content_width in actual test function, not dataProvider
Browse files Browse the repository at this point in the history
Tests failed in Travis,
so attempt to fix them.
  • Loading branch information
kienstra committed Nov 16, 2019
1 parent b54a8e9 commit 68ef6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/php/modules/shortcodes/test-class.dailymotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ public function test_shortcodes_dailymotion_params() {
* @return array The test data.
*/
public function get_dailymotion_amp_data() {
global $content_width;
$content_width = self::CONTENT_WIDTH;

$id = 26423151;
$default_height = 471;

Expand Down Expand Up @@ -202,6 +199,9 @@ public function get_dailymotion_amp_data() {
* @param string $expected The expected return value of the function.
*/
public function test_shortcodes_dailymotion_amp( $shortcode_content, $expected ) {
global $content_width;
$content_width = self::CONTENT_WIDTH;

add_filter( 'jetpack_is_amp_request', '__return_true' );
$this->assertEquals( $expected, do_shortcode( $shortcode_content ) );
}
Expand Down

0 comments on commit 68ef6e8

Please sign in to comment.