Skip to content

Commit 7686f2a

Browse files
committed
Update fonts tests without text/css type
1 parent da9df43 commit 7686f2a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/phpunit/tests/fonts/font-face/wpFontFace/generateAndPrint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function test_should_not_generate_and_print_when_no_fonts() {
3131
*/
3232
public function test_should_generate_and_print_given_fonts( array $fonts, $expected ) {
3333
$font_face = new WP_Font_Face();
34-
$style_element = "<style class='wp-fonts-local' type='text/css'>\n%s\n</style>\n";
34+
$style_element = "<style class='wp-fonts-local'>\n%s\n</style>\n";
3535
$expected_output = sprintf( $style_element, $expected );
3636

3737
$this->expectOutputString( $expected_output );

tests/phpunit/tests/fonts/font-face/wpPrintFontFaces.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function test_should_escape_tags() {
5555
);
5656

5757
$expected_output = <<<CSS
58-
<style class='wp-fonts-local' type='text/css'>
58+
<style class='wp-fonts-local'>
5959
@font-face{font-family:"Source Serif Pro";font-style:normal;font-weight:200 900;font-display:fallback;src:url('http://example.com/assets/source-serif-pro/SourceSerif4Variable-Roman.ttf.woff2') format('woff2');font-stretch:;}
6060
</style>
6161
@@ -76,7 +76,7 @@ public function test_should_print_fonts_in_merged_data() {
7676
}
7777

7878
private function get_expected_styles_output( $styles ) {
79-
$style_element = "<style class='wp-fonts-local' type='text/css'>\n%s\n</style>\n";
79+
$style_element = "<style class='wp-fonts-local'>\n%s\n</style>\n";
8080
return sprintf( $style_element, $styles );
8181
}
8282
}

tests/phpunit/tests/fonts/font-face/wpPrintFontFacesFromStyleVariations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function test_should_print_fonts_in_style_variations() {
4848
}
4949

5050
private function get_expected_styles_output( $styles ) {
51-
$style_element = "<style class='wp-fonts-local' type='text/css'>\n%s\n</style>\n";
51+
$style_element = "<style class='wp-fonts-local'>\n%s\n</style>\n";
5252
return sprintf( $style_element, $styles );
5353
}
5454
}

0 commit comments

Comments
 (0)