From 5fb5df85cc288179a3f72a56ab9f100c9b073dc7 Mon Sep 17 00:00:00 2001 From: Sarah Norris <1645628+mikachan@users.noreply.github.com> Date: Thu, 25 Jan 2024 11:14:34 +0000 Subject: [PATCH] Font Library: Typo fixes (#58243) * Fix typo in library-font-variant.js * Fix typos in __construct.php * Fix typos in isConfigValid.php --- .../font-library-modal/library-font-variant.js | 4 ++-- .../fonts/font-library/wpFontCollection/__construct.php | 6 +++--- .../fonts/font-library/wpFontCollection/isConfigValid.php | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js b/packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js index 94fee2852478ef..0d84b9fbcb5aed 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js @@ -20,7 +20,7 @@ function LibraryFontVariant( { face, font } ) { const { isFontActivated, toggleActivateFont } = useContext( FontLibraryContext ); - const isIstalled = + const isInstalled = font?.fontFace?.length > 0 ? isFontActivated( font.slug, @@ -52,7 +52,7 @@ function LibraryFontVariant( { face, font } ) { setExpectedIncorrectUsage( 'WP_Font_Collection::is_config_valid' ); new WP_Font_Collection( $config ); } @@ -65,7 +65,7 @@ public function test_should_do_ti_wrong( $config ) { * * @return array */ - public function data_should_do_ti_wrong() { + public function data_should_do_it_wrong() { return array( 'no id' => array( array( diff --git a/phpunit/tests/fonts/font-library/wpFontCollection/isConfigValid.php b/phpunit/tests/fonts/font-library/wpFontCollection/isConfigValid.php index 7cfdfc829ab863..9179db9db10a8a 100644 --- a/phpunit/tests/fonts/font-library/wpFontCollection/isConfigValid.php +++ b/phpunit/tests/fonts/font-library/wpFontCollection/isConfigValid.php @@ -44,16 +44,16 @@ public function data_is_config_valid() { } /** - * @dataProvider data_is_config_valid_should_call_doing_ti_wrong + * @dataProvider data_is_config_valid_should_call_doing_it_wrong * * @param mixed $config Config of the font collection. */ - public function test_is_config_valid_should_call_doing_ti_wrong( $config ) { + public function test_is_config_valid_should_call_doing_it_wrong( $config ) { $this->setExpectedIncorrectUsage( 'WP_Font_Collection::is_config_valid', 'Should call _doing_it_wrong if the config is not valid.' ); $this->assertFalse( WP_Font_Collection::is_config_valid( $config ), 'Should return false if the config is not valid.' ); } - public function data_is_config_valid_should_call_doing_ti_wrong() { + public function data_is_config_valid_should_call_doing_it_wrong() { return array( 'with missing slug' => array( 'config' => array(