diff --git a/inc/class-block-editor.php b/inc/class-block-editor.php index c13061f9bf54e18296f5f1a536ca92f5e408dd1b..52cbd6c1310cfa12e9a75d3ad30763b1837d2ad3 100644 --- a/inc/class-block-editor.php +++ b/inc/class-block-editor.php @@ -34,19 +34,6 @@ class Block_Editor { add_action( 'rest_api_init', array( $this, 'action_rest_api_init' ) ); add_filter( 'is_protected_meta', array( $this, 'filter_is_protected_meta' ), 10, 2 ); add_action( $this->cron_action, array( WP_Revisions_Control::get_instance(), 'do_purge_excess' ), 10, 2 ); - add_action( 'admin_init', array( $this, 'action_admin_init' ) ); - } - - /** - * Register admin-only hooks. - * - * @return void - */ - public function action_admin_init() { - if ( ! function_exists( 'use_block_editor_for_post' ) ) { - return; - } - add_action( 'enqueue_block_editor_assets', array( $this, 'action_enqueue_block_editor_assets' ) ); } diff --git a/tests/test-block-editor.php b/tests/test-block-editor.php new file mode 100644 index 0000000000000000000000000000000000000000..01b2bce02da895c504f059c32b69421645d2fed4 --- /dev/null +++ b/tests/test-block-editor.php @@ -0,0 +1,49 @@ +<?php +/** + * Test block-editor features. + * + * @package WP_Revisions_Control + */ + +/** + * Class TestBlockEditor. + * + * @coversDefaultClass \WP_Revisions_Control\Block_Editor + */ +class TestBlockEditor extends WP_UnitTestCase { + /** + * Test REST API additions. + * + * @covers ::action_rest_api_init() + */ + public function test_action_rest_api_init() { + $this->markTestIncomplete(); + } + + /** + * Test REST permissions callback. + * + * @covers ::rest_api_permission_callback() + */ + public function test_rest_api_permission_callback() { + $this->markTestIncomplete(); + } + + /** + * Test scheduling. + * + * @covers ::rest_api_schedule_purge() + */ + public function test_rest_api_schedule_purge() { + $this->markTestIncomplete(); + } + + /** + * Test override for what is considered protected meta. + * + * @covers ::filter_is_protected_meta() + */ + public function test_filter_is_protected_meta() { + $this->markTestIncomplete(); + } +}