Skip to content

Commit

Permalink
Drop a now-obsolete check
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 11, 2019
1 parent d4e743b commit a4e71b1
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/php/sync/test_class.jetpack-sync-callables.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ function test_wp_version_is_synced() {
public function test_sync_callable_whitelist() {
// $this->setSyncClientDefaults();

if ( function_exists( 'register_block_type' ) ) {
add_filter( 'jetpack_set_available_extensions', array( $this, 'add_test_block' ) );
Jetpack_Gutenberg::init();
jetpack_register_block_type( 'jetpack/test' );
}
add_filter( 'jetpack_set_available_extensions', array( $this, 'add_test_block' ) );
Jetpack_Gutenberg::init();
jetpack_register_block_type( 'jetpack/test' );

$callables = array(
'wp_max_upload_size' => wp_max_upload_size(),
Expand Down Expand Up @@ -130,10 +128,8 @@ public function test_sync_callable_whitelist() {
$unique_whitelist = array_unique( $whitelist_keys );
$this->assertEquals( count( $unique_whitelist ), count( $whitelist_keys ), 'The duplicate keys are: ' . print_r( array_diff_key( $whitelist_keys, array_unique( $whitelist_keys ) ), 1 ) );

if ( function_exists( 'register_block_type' ) ) {
remove_filter( 'jetpack_set_available_extensions', array( $this, 'add_test_block' ) );
Jetpack_Gutenberg::reset();
}
remove_filter( 'jetpack_set_available_extensions', array( $this, 'add_test_block' ) );
Jetpack_Gutenberg::reset();
}

public function add_test_block() {
Expand Down

0 comments on commit a4e71b1

Please sign in to comment.