Skip to content

Commit

Permalink
Update test for resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Oct 26, 2022
1 parent 8c7f5bb commit d0c5631
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions phpunit/class-wp-theme-json-resolver-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,6 @@ public function test_translations_are_applied() {
);
}

public function test_switching_themes_recalculates_data() {
// The "default" theme doesn't have theme.json support.
switch_theme( 'default' );
$default = WP_Theme_JSON_Resolver_Gutenberg::theme_has_support();

// Switch to a theme that does have support.
switch_theme( 'block-theme' );
$has_theme_json_support = WP_Theme_JSON_Resolver_Gutenberg::theme_has_support();

$this->assertFalse( $default );
$this->assertTrue( $has_theme_json_support );
}

public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() {
switch_theme( 'default' );
$color_palette = array(
Expand Down Expand Up @@ -165,7 +152,7 @@ public function test_add_theme_supports_are_loaded_for_themes_without_theme_json
remove_theme_support( 'custom-line-height' );
remove_theme_support( 'editor-color-palette' );

$this->assertFalse( WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() );
$this->assertFalse( wp_theme_has_theme_json() );
$this->assertTrue( $settings['typography']['lineHeight'] );
$this->assertSame( $color_palette, $settings['color']['palette']['theme'] );
}
Expand Down

0 comments on commit d0c5631

Please sign in to comment.