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(