Code Duplication    Length = 10-10 lines in 2 locations

projects/plugins/jetpack/tests/php/_inc/lib/test_class.rest-api-endpoints.php 2 locations

@@ 924-933 (lines=10) @@
921
	 *
922
	 * @since 5.5.0
923
	 */
924
	public function test_fetch_nonexistent_widget_data() {
925
		jetpack_register_widget_milestone();
926
927
		$response = $this->create_and_get_request( 'widgets/some_other_slug-133', array(), 'GET' );
928
929
		// Fails because there is no such widget
930
		$this->assertResponseStatus( 404, $response );
931
932
		unregister_widget( 'Milestone_Widget' );
933
	}
934
935
	/**
936
	 * Test fetching a nonexistent instance of an existing widget.
@@ 940-949 (lines=10) @@
937
	 *
938
	 * @since 5.5.0
939
	 */
940
	public function test_fetch_nonexistent_widget_instance_data() {
941
		jetpack_register_widget_milestone();
942
943
		$response = $this->create_and_get_request( 'widgets/milestone_widget-333', array(), 'GET' );
944
945
		// Fails because there is no such widget instance
946
		$this->assertResponseStatus( 404, $response );
947
948
		unregister_widget( 'Milestone_Widget' );
949
	}
950
951
	/**
952
	 * Test fetching a widget that exists but has not been registered.