From 8da5a9920724094862a77076709bae04652b20f5 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Wed, 16 Aug 2023 14:58:59 -0300 Subject: [PATCH 1/3] change properties from snake case to camel case to math the rest of the properties --- .../fonts-library/class-wp-font-family.php | 12 ++++++------ .../class-wp-rest-fonts-library-controller.php | 8 ++++---- .../class-wp-font-family-test.php | 10 +++++----- ...s-wp-rest-fonts-library-controller-test.php | 18 +++++++++--------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/experimental/fonts-library/class-wp-font-family.php b/lib/experimental/fonts-library/class-wp-font-family.php index 1e8b424f63a4c9..363bbe9b479284 100644 --- a/lib/experimental/fonts-library/class-wp-font-family.php +++ b/lib/experimental/fonts-library/class-wp-font-family.php @@ -260,7 +260,7 @@ private function move_font_face_asset( $font_face, $file ) { // Remove the uploaded font asset reference from the font face definition // because it is no longer needed. - unset( $new_font_face['uploaded_file'] ); + unset( $new_font_face['uploadedFile'] ); // If the filename has no font mime type, don't move the file and // return the font face definition without src to be ignored later. @@ -329,7 +329,7 @@ private function sanitize() { */ private function download_font_face_assets( $font_face ) { $new_font_face = $font_face; - $sources = (array) $font_face['download_from_url']; + $sources = (array) $font_face['downloadFromUrl']; $new_font_face['src'] = array(); $index = 0; @@ -353,7 +353,7 @@ private function download_font_face_assets( $font_face ) { // Remove the download url reference from the font face definition // because it is no longer needed. - unset( $new_font_face['download_from_url'] ); + unset( $new_font_face['downloadFromUrl'] ); return $new_font_face; } @@ -380,16 +380,16 @@ private function download_or_move_font_faces( $files ) { $new_font_face = $font_face; // If installing google fonts, download the font face assets. - if ( ! empty( $font_face['download_from_url'] ) ) { + if ( ! empty( $font_face['downloadFromUrl'] ) ) { $new_font_face = $this->download_font_face_assets( $new_font_face ); } // If installing local fonts, move the font face assets from // the temp folder to the wp fonts directory. - if ( ! empty( $font_face['uploaded_file'] ) && ! empty( $files ) ) { + if ( ! empty( $font_face['uploadedFile'] ) && ! empty( $files ) ) { $new_font_face = $this->move_font_face_asset( $new_font_face, - $files[ $new_font_face['uploaded_file'] ] + $files[ $new_font_face['uploadedFile'] ] ); } diff --git a/lib/experimental/fonts-library/class-wp-rest-fonts-library-controller.php b/lib/experimental/fonts-library/class-wp-rest-fonts-library-controller.php index bd094c6230226c..d4abfec476b663 100644 --- a/lib/experimental/fonts-library/class-wp-rest-fonts-library-controller.php +++ b/lib/experimental/fonts-library/class-wp-rest-fonts-library-controller.php @@ -138,17 +138,17 @@ private function get_validation_errors( $font_families, $files ) { ); } - if ( isset( $font_face['download_from_url'] ) && isset( $font_face['uploaded_file'] ) ) { + if ( isset( $font_face['downloadFromUrl'] ) && isset( $font_face['uploadedFile'] ) ) { $error_messages[] = sprintf( // translators: 1: font family index, 2: font face index. - __( 'Font family [%1$s] Font face [%2$s] should have only one of the download_from_url or uploaded_file properties defined and not both.', 'gutenberg' ), + __( 'Font family [%1$s] Font face [%2$s] should have only one of the downloadFromUrl or uploadedFile properties defined and not both.', 'gutenberg' ), $family_index, $face_index ); } - if ( isset( $font_face['uploaded_file'] ) ) { - if ( ! isset( $files[ $font_face['uploaded_file'] ] ) ) { + if ( isset( $font_face['uploadedFile'] ) ) { + if ( ! isset( $files[ $font_face['uploadedFile'] ] ) ) { $error_messages[] = sprintf( // translators: 1: font family index, 2: font face index. __( 'Font family [%1$s] Font face [%2$s] file is not defined in the request files.', 'gutenberg' ), diff --git a/phpunit/fonts-library/class-wp-font-family-test.php b/phpunit/fonts-library/class-wp-font-family-test.php index 85e5c2c6e5fdec..15c7d24a75ccc6 100644 --- a/phpunit/fonts-library/class-wp-font-family-test.php +++ b/phpunit/fonts-library/class-wp-font-family-test.php @@ -181,8 +181,8 @@ public function test_install_and_uninstall( $font_data, $installed_font_data, $f $this->assertSame( $installed_font_data['fontFamily'], $content['fontFamily'], 'The font post content has the wrong font family.' ); $this->assertSame( $installed_font_data['slug'], $content['slug'], 'The font post content has the wrong slug.' ); - $this->assertArrayNotHasKey( 'download_from_url', $content, 'The installed font should not have the url from where it was downloaded.' ); - $this->assertArrayNotHasKey( 'uploaded_file', $content, 'The installed font should not have the reference to the file from it was installed.' ); + $this->assertArrayNotHasKey( 'downloadFromUrl', $content, 'The installed font should not have the url from where it was downloaded.' ); + $this->assertArrayNotHasKey( 'uploadedFile', $content, 'The installed font should not have the reference to the file from it was installed.' ); $this->assertCount( count( $installed_font_data['fontFace'] ), $content['fontFace'], 'One or more font faces could not be installed.' ); @@ -216,7 +216,7 @@ public function data_font_fixtures() { 'fontStyle' => 'italic', 'fontWeight' => '400', 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', - 'download_from_url' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), ), @@ -289,13 +289,13 @@ public function data_font_fixtures() { 'fontFamily' => 'Inter', 'fontStyle' => 'normal', 'fontWeight' => '400', - 'uploaded_file' => 'files0', + 'uploadedFile' => 'files0', ), array( 'fontFamily' => 'Inter', 'fontStyle' => 'normal', 'fontWeight' => '500', - 'uploaded_file' => 'files1', + 'uploadedFile' => 'files1', ), ), ), diff --git a/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php b/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php index f263194e099bc6..627720d84947a4 100644 --- a/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php +++ b/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php @@ -135,7 +135,7 @@ public function data_install_and_uninstall_fonts() { 'fontStyle' => 'normal', 'fontWeight' => '400', 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', - 'download_from_url' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), ), @@ -149,7 +149,7 @@ public function data_install_and_uninstall_fonts() { 'fontStyle' => 'normal', 'fontWeight' => '100', 'src' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', - 'download_from_url' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', + 'downloadFromUrl' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', ), ), ), @@ -275,7 +275,7 @@ public function data_install_and_uninstall_fonts() { 'fontFamily' => 'Piazzolla', 'fontStyle' => 'normal', 'fontWeight' => '400', - 'uploaded_file' => 'files0', + 'uploadedFile' => 'files0', ), ), ), @@ -288,7 +288,7 @@ public function data_install_and_uninstall_fonts() { 'fontFamily' => 'Montserrat', 'fontStyle' => 'normal', 'fontWeight' => '100', - 'uploaded_file' => 'files1', + 'uploadedFile' => 'files1', ), ), ), @@ -421,7 +421,7 @@ public function data_install_with_improper_inputs() { 'fontFamily' => 'Piazzolla', 'fontStyle' => 'normal', 'fontWeight' => '400', - 'uploaded_file' => 'files0', + 'uploadedFile' => 'files0', ), ), ), @@ -440,7 +440,7 @@ public function data_install_with_improper_inputs() { 'fontFamily' => 'Piazzolla', 'fontStyle' => 'normal', 'fontWeight' => '400', - 'uploaded_file' => 'files666', + 'uploadedFile' => 'files666', ), ), ), @@ -456,7 +456,7 @@ public function data_install_with_improper_inputs() { ), ), - 'fontface with incompatible properties (download_from_url and uploaded_file together)' => array( + 'fontface with incompatible properties (downloadFromUrl and uploadedFile together)' => array( 'font_families' => array( array( 'fontFamily' => 'Piazzolla', @@ -468,8 +468,8 @@ public function data_install_with_improper_inputs() { 'fontStyle' => 'normal', 'fontWeight' => '400', 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', - 'download_from_url' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', - 'uploaded_file' => 'files0', + 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'uploadedFile' => 'files0', ), ), ), From d633c25a19a302cb8e5d62ef3230472edd56fe85 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Wed, 16 Aug 2023 15:14:31 -0300 Subject: [PATCH 2/3] formatting php --- .../class-wp-font-family-test.php | 20 ++++---- ...-wp-rest-fonts-library-controller-test.php | 50 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/phpunit/fonts-library/class-wp-font-family-test.php b/phpunit/fonts-library/class-wp-font-family-test.php index 15c7d24a75ccc6..06209c1c3946a6 100644 --- a/phpunit/fonts-library/class-wp-font-family-test.php +++ b/phpunit/fonts-library/class-wp-font-family-test.php @@ -212,10 +212,10 @@ public function data_font_fixtures() { 'fontFamily' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), @@ -286,15 +286,15 @@ public function data_font_fixtures() { 'fontFamily' => 'Inter', 'fontFace' => array( array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Inter', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files0', ), array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'normal', - 'fontWeight' => '500', + 'fontFamily' => 'Inter', + 'fontStyle' => 'normal', + 'fontWeight' => '500', 'uploadedFile' => 'files1', ), ), diff --git a/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php b/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php index 627720d84947a4..1bbce5f7cb9202 100644 --- a/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php +++ b/phpunit/fonts-library/class-wp-rest-fonts-library-controller-test.php @@ -131,10 +131,10 @@ public function data_install_and_uninstall_fonts() { 'name' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'normal', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'normal', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), @@ -145,10 +145,10 @@ public function data_install_and_uninstall_fonts() { 'name' => 'Montserrat', 'fontFace' => array( array( - 'fontFamily' => 'Montserrat', - 'fontStyle' => 'normal', - 'fontWeight' => '100', - 'src' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', + 'fontFamily' => 'Montserrat', + 'fontStyle' => 'normal', + 'fontWeight' => '100', + 'src' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Uw-Y3tcoqK5.ttf', ), ), @@ -272,9 +272,9 @@ public function data_install_and_uninstall_fonts() { 'name' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files0', ), ), @@ -285,9 +285,9 @@ public function data_install_and_uninstall_fonts() { 'name' => 'Montserrat', 'fontFace' => array( array( - 'fontFamily' => 'Montserrat', - 'fontStyle' => 'normal', - 'fontWeight' => '100', + 'fontFamily' => 'Montserrat', + 'fontStyle' => 'normal', + 'fontWeight' => '100', 'uploadedFile' => 'files1', ), ), @@ -418,9 +418,9 @@ public function data_install_with_improper_inputs() { 'slug' => 'piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files0', ), ), @@ -437,9 +437,9 @@ public function data_install_with_improper_inputs() { 'slug' => 'piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files666', ), ), @@ -464,12 +464,12 @@ public function data_install_with_improper_inputs() { 'name' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'normal', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'normal', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', - 'uploadedFile' => 'files0', + 'uploadedFile' => 'files0', ), ), ), From 4fb849811262eca825add64611e0a76fe715f697 Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Wed, 16 Aug 2023 15:23:01 -0300 Subject: [PATCH 3/3] php formatting --- phpunit/fonts-library/wpFontFamily/base.php | 6 +-- .../wpFontFamily/getData-test.php | 20 ++++----- .../wpFontFamily/install-test.php | 42 +++++++++---------- .../wpFontFamily/uninstall-test.php | 18 ++++---- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/phpunit/fonts-library/wpFontFamily/base.php b/phpunit/fonts-library/wpFontFamily/base.php index 16ac44c294826d..8343a7e7f40699 100644 --- a/phpunit/fonts-library/wpFontFamily/base.php +++ b/phpunit/fonts-library/wpFontFamily/base.php @@ -44,9 +44,9 @@ public function set_up() { 'fontFamily' => 'Merriweather', 'fontFace' => array( array( - 'fontFamily' => 'Merriweather', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Merriweather', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files0', ), ), diff --git a/phpunit/fonts-library/wpFontFamily/getData-test.php b/phpunit/fonts-library/wpFontFamily/getData-test.php index 0a6c0ec1a9f57d..d377ee4a095fe8 100644 --- a/phpunit/fonts-library/wpFontFamily/getData-test.php +++ b/phpunit/fonts-library/wpFontFamily/getData-test.php @@ -36,10 +36,10 @@ public function data_should_get_data() { 'fontFamily' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), @@ -75,15 +75,15 @@ public function data_should_get_data() { 'fontFamily' => 'Inter', 'fontFace' => array( array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Inter', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files0', ), array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'normal', - 'fontWeight' => '500', + 'fontFamily' => 'Inter', + 'fontStyle' => 'normal', + 'fontWeight' => '500', 'uploadedFile' => 'files1', ), ), diff --git a/phpunit/fonts-library/wpFontFamily/install-test.php b/phpunit/fonts-library/wpFontFamily/install-test.php index 4b20bdf916ae3a..4e9855e868e74a 100644 --- a/phpunit/fonts-library/wpFontFamily/install-test.php +++ b/phpunit/fonts-library/wpFontFamily/install-test.php @@ -114,10 +114,10 @@ public function data_should_download_fontfaces() { 'fontFamily' => 'Piazzolla', 'fontFace' => array( array( - 'fontFamily' => 'Piazzolla', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', + 'fontFamily' => 'Piazzolla', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/piazzolla/v33/N0b72SlTPu5rIkWIZjVgI-TckS03oGpPETyEJ88Rbvi0_TzOzKcQhZqx3gX9BRy5m5M.ttf', ), ), @@ -131,17 +131,17 @@ public function data_should_download_fontfaces() { 'fontFamily' => 'Lato', 'fontFace' => array( array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'normal', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHvxk6XweuBCY.ttf', + 'fontFamily' => 'Lato', + 'fontStyle' => 'normal', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHvxk6XweuBCY.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHvxk6XweuBCY.ttf', ), array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'italic', - 'fontWeight' => '400', - 'src' => 'http://fonts.gstatic.com/s/lato/v24/S6u8w4BMUTPHjxswWyWrFCbw7A.ttf', + 'fontFamily' => 'Lato', + 'fontStyle' => 'italic', + 'fontWeight' => '400', + 'src' => 'http://fonts.gstatic.com/s/lato/v24/S6u8w4BMUTPHjxswWyWrFCbw7A.ttf', 'downloadFromUrl' => 'http://fonts.gstatic.com/s/lato/v24/S6u8w4BMUTPHjxswWyWrFCbw7A.ttf', ), ), @@ -187,9 +187,9 @@ public function data_should_move_local_fontfaces() { 'fontFamily' => 'Inter', 'fontFace' => array( array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '900', + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '900', 'uploadedFile' => 'files0', ), ), @@ -212,15 +212,15 @@ public function data_should_move_local_fontfaces() { 'fontFamily' => 'Lato', 'fontFace' => array( array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Lato', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files1', ), array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'normal', - 'fontWeight' => '500', + 'fontFamily' => 'Lato', + 'fontStyle' => 'normal', + 'fontWeight' => '500', 'uploadedFile' => 'files2', ), ), diff --git a/phpunit/fonts-library/wpFontFamily/uninstall-test.php b/phpunit/fonts-library/wpFontFamily/uninstall-test.php index 5a228bd78b6775..27e6444dedd4ac 100644 --- a/phpunit/fonts-library/wpFontFamily/uninstall-test.php +++ b/phpunit/fonts-library/wpFontFamily/uninstall-test.php @@ -133,9 +133,9 @@ public function data_should_uninstall() { 'fontFamily' => 'Inter', 'fontFace' => array( array( - 'fontFamily' => 'Inter', - 'fontStyle' => 'italic', - 'fontWeight' => '900', + 'fontFamily' => 'Inter', + 'fontStyle' => 'italic', + 'fontWeight' => '900', 'uploadedFile' => 'files0', ), ), @@ -158,15 +158,15 @@ public function data_should_uninstall() { 'fontFamily' => 'Lato', 'fontFace' => array( array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'normal', - 'fontWeight' => '400', + 'fontFamily' => 'Lato', + 'fontStyle' => 'normal', + 'fontWeight' => '400', 'uploadedFile' => 'files1', ), array( - 'fontFamily' => 'Lato', - 'fontStyle' => 'normal', - 'fontWeight' => '500', + 'fontFamily' => 'Lato', + 'fontStyle' => 'normal', + 'fontWeight' => '500', 'uploadedFile' => 'files2', ), ),