Code Duplication    Length = 6-6 lines in 2 locations

projects/packages/backup/tests/php/test-rest-controller.php 2 locations

@@ 65-70 (lines=6) @@
62
	/**
63
	 * Testing the `/jetpack/v4/backup-helper-script` endpoint when the `helper` param is missing.
64
	 */
65
	public function test_backup_helper_script_missing_required_param() {
66
		$request  = new WP_REST_Request( 'POST', '/jetpack/v4/backup-helper-script' );
67
		$response = $this->server->dispatch( $request );
68
		$this->assertEquals( 400, $response->get_status() );
69
		$this->assertEquals( 'Missing parameter(s): helper', $response->get_data()['message'] );
70
	}
71
72
	/**
73
	 * Testing the `/jetpack/v4/backup-helper-script` endpoint with admin user.
@@ 120-125 (lines=6) @@
117
	/**
118
	 * Testing the `/jetpack/v4/delete-backup-helper-script` endpoint when the `path` param is missing.
119
	 */
120
	public function test_delete_backup_helper_script_missing_required_param() {
121
		$request  = new WP_REST_Request( 'POST', '/jetpack/v4/delete-backup-helper-script' );
122
		$response = $this->server->dispatch( $request );
123
		$this->assertEquals( 400, $response->get_status() );
124
		$this->assertEquals( 'Missing parameter(s): path', $response->get_data()['message'] );
125
	}
126
127
	/**
128
	 * Testing the `/jetpack/v4/delete-backup-helper-script` endpoint with admin user.