| @@ 104-111 (lines=8) @@ | ||
| 101 | $this->assertErrorResponse('rest_cannot_read_status', $response, 401); |
|
| 102 | } |
|
| 103 | ||
| 104 | public function test_get_item_invalid_internal() |
|
| 105 | { |
|
| 106 | $user_id = $this->factory->user->create(); |
|
| 107 | wp_set_current_user($user_id); |
|
| 108 | ||
| 109 | $request = new WP_REST_Request('GET', '/wp/v2/statuses/inherit'); |
|
| 110 | $response = $this->server->dispatch($request); |
|
| 111 | $this->assertErrorResponse('rest_cannot_read_status', $response, 403); |
|
| 112 | } |
|
| 113 | ||
| 114 | public function test_create_item() |
|
| @@ 603-611 (lines=9) @@ | ||
| 600 | $this->assertEquals(array(), $data); |
|
| 601 | } |
|
| 602 | ||
| 603 | public function test_get_item() |
|
| 604 | { |
|
| 605 | $user_id = $this->factory->user->create(); |
|
| 606 | wp_set_current_user(self::$user); |
|
| 607 | ||
| 608 | $request = new WP_REST_Request('GET', sprintf('/wp/v2/users/%d', $user_id)); |
|
| 609 | ||
| 610 | $response = $this->server->dispatch($request); |
|
| 611 | $this->check_get_user_response($response, 'embed'); |
|
| 612 | } |
|
| 613 | ||
| 614 | public function test_prepare_item() |
|