Skip to content

Commit

Permalink
Fix php coding standards error
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored and scruffian committed Jul 20, 2023
1 parent 2b77066 commit 2e561dc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ public function test_embedded_navigation_post_contains_required_fields() {
// First we'll use the navigation fallback to get a link to the navigation endpoint.
$request = new WP_REST_Request( 'GET', '/wp-block-editor/v1/navigation-fallback' );
$response = rest_get_server()->dispatch( $request );
$links = $response->get_links();
$links = $response->get_links();

// Extract the navigation endpoint URL from the response.
$embedded_navigation_href = $links['self'][0]['href'];
preg_match( '/\?rest_route=(.*)/', $embedded_navigation_href, $matches );
$navigation_endpoint = $matches[1];

// Fetch the "linked" navigation post from the endpoint, with the context parameter set to 'embed' to simulate fetching embedded links.
$request = new WP_REST_Request( 'GET', $navigation_endpoint );
$request = new WP_REST_Request( 'GET', $navigation_endpoint );
$request->set_param( 'context', 'embed' );
$response = rest_get_server()->dispatch( $request );
$data = $response->get_data();
Expand Down

0 comments on commit 2e561dc

Please sign in to comment.