Changeset 38838
- Timestamp:
- 10/20/2016 09:06:11 AM (8 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/widgets.php
r37352 r38838 45 45 remove_action( 'after_setup_theme', 'twentysixteen_setup' ); 46 46 remove_action( 'customize_register', 'twentysixteen_customize_register', 11 ); 47 remove_action( 'after_setup_theme', 'twentyseventeen_setup' ); 47 48 48 49 $this->backup_registered_sidebars = $GLOBALS['wp_registered_sidebars']; -
trunk/tests/phpunit/tests/media.php
r38812 r38838 34 34 $this->img_html = '<img src="' . $this->img_url . '"/>'; 35 35 $this->img_meta = array( 'width' => 100, 'height' => 100, 'sizes' => '' ); 36 37 // Disable Twenty Seventeen changes to the image size attribute 38 remove_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr' ); 39 remove_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr' ); 40 } 41 42 function tearDown() { 43 parent::tearDown(); 44 45 // Reset Twenty Seventeen behaviour 46 add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 ); 47 add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 ); 36 48 } 37 49 … … 56 68 array( 'width' => 20, 'caption' => $this->caption ) 57 69 ); 70 58 71 $this->assertEquals( 2, preg_match_all( '/wp-caption/', $result, $_r ) ); 59 72 $this->assertEquals( 1, preg_match_all( '/alignnone/', $result, $_r ) ); 60 73 $this->assertEquals( 1, preg_match_all( "/{$this->caption}/", $result, $_r ) ); 61 $this->assertEquals( 1, preg_match_all( "/width: 30/", $result, $_r ) ); 74 75 if ( current_theme_supports( 'html5', 'caption' ) ) { 76 $this->assertEquals( 1, preg_match_all( "/width: 20/", $result, $_r ) ); 77 } else { 78 $this->assertEquals( 1, preg_match_all( "/width: 30/", $result, $_r ) ); 79 } 62 80 } 63 81
Note: See TracChangeset
for help on using the changeset viewer.