Skip to content

Commit

Permalink
Add docblocks and ticket references.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Oct 20, 2024
1 parent d749a9d commit 24a77bc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public static function set_up_before_class() {
parent::set_up_before_class();
}

/**
* Ensure that an empty array is returned when the theme has no style variations.
*
* @ticket 62231
*/
public function test_should_return_empty_array_when_theme_has_no_style_variations() {
switch_theme( 'block-theme' );

Expand All @@ -29,6 +34,11 @@ public function test_should_return_empty_array_when_theme_has_no_style_variation
$this->assertEmpty( $fonts, 'Should return an empty array' );
}

/**
* Ensure that all variations are loaded from a theme.
*
* @ticket 62231
*/
public function test_should_return_all_fonts_from_all_style_variations() {
switch_theme( static::FONTS_THEME );

Expand All @@ -38,6 +48,11 @@ public function test_should_return_all_fonts_from_all_style_variations() {
$this->assertSame( $expected, $actual, 'All the fonts from the theme variations should be returned.' );
}

/**
* Ensure that file:./ is replaced in the src list.
*
* @ticket 62231
*/
public function test_should_replace_src_file_placeholder() {
switch_theme( static::FONTS_THEME );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,23 @@ public static function set_up_before_class() {
self::$requires_switch_theme_fixtures = true;
}

/**
* Ensure that no fonts are printed when the theme has no fonts.
*
* @ticket 62231
*/
public function test_should_not_print_when_no_fonts() {
switch_theme( 'block-theme' );

$this->expectOutputString( '' );
wp_print_font_faces_from_style_variations();
}

/**
* Ensure that all fonts are printed from the theme style variations.
*
* @ticket 62231
*/
public function test_should_print_fonts_in_style_variations() {
switch_theme( static::FONTS_THEME );

Expand Down

0 comments on commit 24a77bc

Please sign in to comment.