From a4d2e404dac9596e317ccf5673eed1002497307d Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 11 Aug 2024 19:37:49 +0100 Subject: [PATCH] Switch to stable external schemas. --- tests/mu-plugins/mu-plugin.php | 3 +++ tests/output/font-collection.php | 7 ++++++- tests/output/fonts.php | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/mu-plugins/mu-plugin.php b/tests/mu-plugins/mu-plugin.php index 0876099..4ba7ee1 100644 --- a/tests/mu-plugins/mu-plugin.php +++ b/tests/mu-plugins/mu-plugin.php @@ -33,6 +33,9 @@ ) ); } ); +$composer = json_decode( file_get_contents( dirname( __DIR__, 2 ) . '/composer.json' ), true ); +define( 'WP_VERSION', $composer['require-dev']['roots/wordpress-full'] ); + add_action( 'init', function() : void { // Ensure we're authenticated as an admin during test data generation. grant_super_admin( 1 ); diff --git a/tests/output/font-collection.php b/tests/output/font-collection.php index 8c1c558..2474612 100644 --- a/tests/output/font-collection.php +++ b/tests/output/font-collection.php @@ -8,7 +8,12 @@ $data, ], 'font-collections' ); +$url = sprintf( + 'https://raw.githubusercontent.com/WordPress/gutenberg/wp/%s/schemas/json/font-collection.json', + WP_VERSION, +); + save_external_schema( - 'https://schemas.wp.org/trunk/font-collection.json', + $url, 'font-collection' ); diff --git a/tests/output/fonts.php b/tests/output/fonts.php index 89fe94e..1c0f643 100644 --- a/tests/output/fonts.php +++ b/tests/output/fonts.php @@ -49,8 +49,13 @@ $data, ], 'font-faces' ); +$url = sprintf( + 'https://raw.githubusercontent.com/WordPress/gutenberg/wp/%s/schemas/json/theme.json', + WP_VERSION, +); + save_external_schema( - 'https://schemas.wp.org/trunk/theme.json', + $url, 'font-face', [ 'definitions',