Skip to content

Commit

Permalink
Font Library: Typo fixes (#58243)
Browse files Browse the repository at this point in the history
* Fix typo in library-font-variant.js

* Fix typos in __construct.php

* Fix typos in isConfigValid.php
  • Loading branch information
mikachan authored and youknowriad committed Jan 31, 2024
1 parent c2f6d07 commit 5fb5df8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function LibraryFontVariant( { face, font } ) {
const { isFontActivated, toggleActivateFont } =
useContext( FontLibraryContext );

const isIstalled =
const isInstalled =
font?.fontFace?.length > 0
? isFontActivated(
font.slug,
Expand Down Expand Up @@ -52,7 +52,7 @@ function LibraryFontVariant( { face, font } ) {
<Flex justify="space-between" align="center" gap="1rem">
<FontFaceDemo fontFace={ face } text={ displayName } />
<CheckboxControl
checked={ isIstalled }
checked={ isInstalled }
onChange={ handleToggleActivation }
__nextHasNoMarginBottom={ true }
id={ checkboxId }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5fb5df8

Please sign in to comment.