Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Fix typos in fonts API #47288

Merged
merged 3 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private function build_font_face_css( array $font ) {

// Compile the "src" parameter.
if ( 'src' === $key ) {
$value = $this->compile_src( $font['font-family'], $value );
$value = $this->compile_src( $value );
}

// If font-variation-settings is an array, convert it to a string.
Expand All @@ -200,11 +200,10 @@ private function build_font_face_css( array $font ) {
*
* @since X.X.X
*
* @param string $font_family Font family.
* @param array $value Value to process.
* @param array $value Value to process.
* @return string The CSS.
*/
private function compile_src( $font_family, array $value ) {
private function compile_src( array $value ) {
$src = '';

foreach ( $value as $item ) {
Expand Down
2 changes: 1 addition & 1 deletion phpunit/fonts-api/wpFonts/registerProvider-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function data_register_providers() {
);
}

public function test_should_register_mutliple_providers() {
public function test_should_register_multiple_providers() {
$wp_fonts = new WP_Fonts();
$providers = $this->get_provider_definitions();
foreach ( $providers as $provider ) {
Expand Down
2 changes: 1 addition & 1 deletion phpunit/fonts-api/wpFonts/removeVariation-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private function setup_integration_test() {
public function test_mocked_setup( $font_family_handle, $variation_handle ) {
$this->setup_unit_test();

$this->assertArrayHasKey( $variation_handle, $this->wp_fonts->registered, 'Variation should be in the registered queue before remval' );
$this->assertArrayHasKey( $variation_handle, $this->wp_fonts->registered, 'Variation should be in the registered queue before removal' );
$this->assertContains( $variation_handle, $this->wp_fonts->registered[ $font_family_handle ]->deps, 'Variation should be in its font family deps before removal' );
}

Expand Down