From ed28291f1936835b57c7e90118c515c97859ea14 Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Thu, 25 Jan 2024 10:34:22 +0000 Subject: [PATCH 1/3] Fix typo in library-font-variant.js --- .../global-styles/font-library-modal/library-font-variant.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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 } ) { Date: Thu, 25 Jan 2024 10:37:53 +0000 Subject: [PATCH 2/3] Fix typos in __construct.php --- .../fonts/font-library/wpFontCollection/__construct.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpunit/tests/fonts/font-library/wpFontCollection/__construct.php b/phpunit/tests/fonts/font-library/wpFontCollection/__construct.php index 8e9cf7bca08e5e..d4b75038a6e7ac 100644 --- a/phpunit/tests/fonts/font-library/wpFontCollection/__construct.php +++ b/phpunit/tests/fonts/font-library/wpFontCollection/__construct.php @@ -51,11 +51,11 @@ public function test_should_initialize_data() { } /** - * @dataProvider data_should_do_ti_wrong + * @dataProvider data_should_do_it_wrong * * @param mixed $config Config of the font collection. */ - public function test_should_do_ti_wrong( $config ) { + public function test_should_do_it_wrong( $config ) { $this->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( From 6fcefd7da15e793cd4e5719b600e5bd7523e1fec Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Thu, 25 Jan 2024 10:38:05 +0000 Subject: [PATCH 3/3] Fix typos in isConfigValid.php --- .../fonts/font-library/wpFontCollection/isConfigValid.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(