Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tests/phpunit/tests/block-bindings/termDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
add_filter( 'pre_term_description', 'wp_filter_kses' );
}

/**
* Tear down after each test.
*/
public function tear_down() {
unregister_taxonomy( 'wptests_private_tax' );

parent::tear_down();
}

/**
* Helper method to create a WP_Block instance.
*
Expand Down Expand Up @@ -449,8 +458,6 @@ public function test_get_value_non_publicly_queryable_taxonomy_unauthenticated()
wp_set_current_user( 0 );

$this->assertNull( _block_bindings_term_data_get_value( array( 'field' => 'name' ), $block ) );

_unregister_taxonomy( 'wptests_private_tax' );
}

/**
Expand Down Expand Up @@ -482,8 +489,6 @@ public function test_get_value_non_publicly_queryable_taxonomy_with_read_capabil
wp_set_current_user( $subscriber_id );

$this->assertSame( 'Secret Term', _block_bindings_term_data_get_value( array( 'field' => 'name' ), $block ) );

_unregister_taxonomy( 'wptests_private_tax' );
}

/**
Expand Down
Loading