Skip to content

Commit 81f15e7

Browse files
committed
Fix query_source test helper to use REST dispatch
1 parent c6eeffc commit 81f15e7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_endpoint.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,12 @@ public function query_request( $GET ) {
118118
}
119119

120120
public function query_source( $post_id ) {
121-
$GET = array(
121+
$GET = array(
122122
'q' => 'source',
123123
'url' => 'http://example.org/?p=' . $post_id,
124124
);
125-
$request = self::query_request( $GET );
126-
$controller = new \Micropub\Rest\Endpoint_Controller();
127-
$response = $controller->query_handler( $request );
125+
$request = self::query_request( $GET );
126+
$response = $this->dispatch( $request, self::$author_id );
128127
return $response->get_data();
129128
}
130129

0 commit comments

Comments
 (0)