diff --git a/.changeset/little-cobras-admire.md b/.changeset/little-cobras-admire.md new file mode 100644 index 00000000..c6b6edb9 --- /dev/null +++ b/.changeset/little-cobras-admire.md @@ -0,0 +1,5 @@ +--- +"@wpengine/wp-graphql-content-blocks": patch +--- + +tests: fix PHP deprecation notices diff --git a/tests/unit/BlockSupportsAnchorTest.php b/tests/unit/BlockSupportsAnchorTest.php index 69f44d6f..364527b2 100644 --- a/tests/unit/BlockSupportsAnchorTest.php +++ b/tests/unit/BlockSupportsAnchorTest.php @@ -11,7 +11,7 @@ final class BlockSupportsAnchorTest extends PluginTestCase { public function setUp(): void { parent::setUp(); - $settings = get_option( 'graphql_general_settings' ); + $settings = get_option( 'graphql_general_settings', [] ); $settings['public_introspection_enabled'] = 'on'; update_option( 'graphql_general_settings', $settings ); diff --git a/tests/unit/EditorBlockInterfaceTest.php b/tests/unit/EditorBlockInterfaceTest.php index 23290f52..938f6eb2 100644 --- a/tests/unit/EditorBlockInterfaceTest.php +++ b/tests/unit/EditorBlockInterfaceTest.php @@ -8,7 +8,7 @@ final class EditorBlockInterfaceTest extends PluginTestCase { public function setUp(): void { parent::setUp(); - $settings = get_option( 'graphql_general_settings' ); + $settings = get_option( 'graphql_general_settings', [] ); $settings['public_introspection_enabled'] = 'on'; update_option( 'graphql_general_settings', $settings ); } diff --git a/tests/unit/PostTypeBlockInterfaceTest.php b/tests/unit/PostTypeBlockInterfaceTest.php index cceb2a25..400fdc4f 100644 --- a/tests/unit/PostTypeBlockInterfaceTest.php +++ b/tests/unit/PostTypeBlockInterfaceTest.php @@ -10,7 +10,7 @@ final class PostTypeBlockInterfaceTest extends PluginTestCase { public function setUp(): void { parent::setUp(); - $settings = get_option( 'graphql_general_settings' ); + $settings = get_option( 'graphql_general_settings', [] ); $settings['public_introspection_enabled'] = 'on'; update_option( 'graphql_general_settings', $settings ); diff --git a/tests/unit/RegistryTestCase.php b/tests/unit/RegistryTestCase.php index 41232379..6aa95630 100644 --- a/tests/unit/RegistryTestCase.php +++ b/tests/unit/RegistryTestCase.php @@ -13,7 +13,7 @@ final class RegistryTestCase extends PluginTestCase { public function setUp(): void { parent::setUp(); - $settings = get_option( 'graphql_general_settings' ); + $settings = get_option( 'graphql_general_settings', [] ); $settings['public_introspection_enabled'] = 'on'; update_option( 'graphql_general_settings', $settings ); diff --git a/tests/unit/UpdateCalbacksTest.php b/tests/unit/UpdateCalbacksTest.php deleted file mode 100644 index 48df9352..00000000 --- a/tests/unit/UpdateCalbacksTest.php +++ /dev/null @@ -1,22 +0,0 @@ -