Code Duplication    Length = 6-6 lines in 2 locations

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

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