Skip to content

Commit

Permalink
Merge pull request #11 from rtCamp/fix/deprecated-test-bugs
Browse files Browse the repository at this point in the history
tests: fix PHP deprecated notice - Automatic conversion of false to array
  • Loading branch information
justlevine authored Sep 16, 2024
2 parents 6e8c34b + 27f459f commit 1a2d5d6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-cobras-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wpengine/wp-graphql-content-blocks": patch
---

tests: fix PHP deprecation notices
2 changes: 1 addition & 1 deletion tests/unit/BlockSupportsAnchorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/EditorBlockInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/PostTypeBlockInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/RegistryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit 1a2d5d6

Please sign in to comment.