public function test_adds_future_post_hook() { $post_type = rand_str(); $post_type_object = new WP_Post_Type($post_type); $post_type_object->add_hooks(); $has_action = has_action("future_{$post_type}", '_future_post_hook'); $post_type_object->remove_hooks(); $has_action_after = has_action("future_{$post_type}", '_future_post_hook'); $this->assertSame(5, $has_action); $this->assertFalse($has_action_after); }