Skip to content

Commit

Permalink
Moves Fonts Library
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya committed Aug 16, 2023
1 parent 11c4e43 commit c89b07c
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ function gutenberg_is_experiment_enabled( $name ) {
*/
if ( defined( 'FONTS_LIBRARY_ENABLE' ) && FONTS_LIBRARY_ENABLE ) {
// Loads the Fonts Library.
require __DIR__ . '/experimental/fonts-library/class-wp-fonts-library.php';
require __DIR__ . '/experimental/fonts-library/class-wp-font-family-utils.php';
require __DIR__ . '/experimental/fonts-library/class-wp-font-family.php';
require __DIR__ . '/experimental/fonts-library/class-wp-rest-fonts-library-controller.php';
require __DIR__ . '/experimental/fonts-library/fonts-library.php';
require __DIR__ . '/experimental/fonts/fonts-library/class-wp-fonts-library.php';
require __DIR__ . '/experimental/fonts/fonts-library/class-wp-font-family-utils.php';
require __DIR__ . '/experimental/fonts/fonts-library/class-wp-font-family.php';
require __DIR__ . '/experimental/fonts/fonts-library/class-wp-rest-fonts-library-controller.php';
require __DIR__ . '/experimental/fonts/fonts-library/fonts-library.php';

if ( ! class_exists( 'WP_Font_Face' ) ) {
require __DIR__ . '/experimental/fonts/font-face/class-wp-font-face.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family::__construct
*/
class Tests_FontsLibrary_WpFontFamily_Construct extends WP_UnitTestCase {
class Tests_Fonts_WpFontFamily_Construct extends WP_UnitTestCase {

public function test_should_initialize_data() {
$property = new ReflectionProperty( WP_Font_Family::class, 'data' );
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family::get_data
*/
class Tests_FontsLibrary_WpFontsLibrary_GetData extends WP_UnitTestCase {
class Tests_Fonts_WpFontsLibrary_GetData extends WP_UnitTestCase {

/**
* @dataProvider data_should_get_data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family::get_data_as_json
*/
class Tests_FontsLibrary_WpFontFamily_GetDataAsJson extends WP_UnitTestCase {
class Tests_Fonts_WpFontFamily_GetDataAsJson extends WP_UnitTestCase {

/**
* @dataProvider data_should_get_data_as_json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @covers WP_Font_Family::get_font_post
*/
class Tests_FontsLibrary_WpFontFamily_GetFontPost extends WP_Font_Family_UnitTestCase {
class Tests_Fonts_WpFontFamily_GetFontPost extends WP_Font_Family_UnitTestCase {

public function test_should_return_post() {
// Set up the post.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family::has_font_faces
*/
class Tests_FontsLibrary_WpFontFamily_HasFontFaces extends WP_UnitTestCase {
class Tests_Fonts_WpFontFamily_HasFontFaces extends WP_UnitTestCase {

public function test_should_return_true_when_check_succeeds() {
$font_data = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @covers WP_Font_Family::install
*/
class Tests_FontsLibrary_WpFontFamily_Install extends WP_Font_Family_UnitTestCase {
class Tests_Fonts_WpFontFamily_Install extends WP_Font_Family_UnitTestCase {

/**
* @dataProvider data_should_not_download_when_no_fontface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @covers WP_Font_Family::uninstall
*/
class Tests_FontsLibrary_WpFontFamily_Uninstall extends WP_Font_Family_UnitTestCase {
class Tests_Fonts_WpFontFamily_Uninstall extends WP_Font_Family_UnitTestCase {

public function test_should_return_error_when_font_not_found() {
// Set up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family_Utils::get_filename_from_font_face
*/
class Tests_FontsLibrary_WpFontsFamilyUtils_GetFilenameFromFontFace extends WP_UnitTestCase {
class Tests_Fonts_WpFontsFamilyUtils_GetFilenameFromFontFace extends WP_UnitTestCase {

/**
* @dataProvider data_should_get_filename
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family_Utils::has_font_mime_type
*/
class Tests_FontsLibrary_WpFontsFamilyUtils_HasFontMimeType extends WP_UnitTestCase {
class Tests_Fonts_WpFontsFamilyUtils_HasFontMimeType extends WP_UnitTestCase {

/**
* @dataProvider data_should_succeed_when_has_mime_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Font_Family_Utils::merge_fonts_data
*/
class Tests_FontsLibrary_WpFontsFamilyUtils_MergeFontsData extends WP_UnitTestCase {
class Tests_Fonts_WpFontsFamilyUtils_MergeFontsData extends WP_UnitTestCase {

/**
* @dataProvider data_should_fail_merge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Fonts_Library::get_fonts_dir
*/
class Tests_FontsLibrary_WpFontsLibrary_GetFontsDir extends WP_UnitTestCase {
class Tests_Fonts_WpFontsLibrary_GetFontsDir extends WP_UnitTestCase {

public function test_get_fonts_dir() {
$this->assertStringEndsWith( '/wp-content/uploads/fonts', WP_Fonts_Library::get_fonts_dir() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @covers WP_Fonts_Library::set_upload_dir
*/
class Tests_FontsLibrary_WpFontsLibrary_SetUploadDir extends WP_UnitTestCase {
class Tests_Fonts_WpFontsLibrary_SetUploadDir extends WP_UnitTestCase {

public function test_should_set_fonts_upload_dir() {
$defaults = array(
Expand Down

0 comments on commit c89b07c

Please sign in to comment.