Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update move backup endpoint to product class #41730

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Remove new test
  • Loading branch information
CodeyGuyDylan committed Feb 12, 2025
commit 034324f40ef954f314e14134014f0b784898af80
22 changes: 0 additions & 22 deletions projects/packages/my-jetpack/tests/php/test-backup-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ public function tear_down() {
WorDBless_Users::init()->clear_all_users();
}

private function get_server() {
global $wp_rest_server;
if ( ! $wp_rest_server ) {
$wp_rest_server = new \WP_REST_Server();
do_action( 'rest_api_init' );
}
return $wp_rest_server;
}

/**
* Tests with Jetpack active
*/
Expand Down Expand Up @@ -170,17 +161,4 @@ public function test_backup_post_activation_url_with_backup_connected() {
activate_plugins( Backup::get_installed_plugin_filename() );
$this->assertSame( '', Backup::get_post_activation_url() );
}

public function test_if_backup_registers_endpoints() {
Backup::register_endpoints();

$server = $this->get_server();
$routes = $server->get_routes();

$namespace = '/my-jetpack/v1';
$route = '/site/backup/undo-event';
$full_route = $namespace . $route;

$this->assertArrayHasKey( $full_route, $routes );
}
}
Loading