| @@ 2839-2847 (lines=9) @@ | ||
| 2836 | $this->assertEquals(true, $properties['type']['readonly']); |
|
| 2837 | } |
|
| 2838 | ||
| 2839 | public function test_get_item_schema_show_avatar() |
|
| 2840 | { |
|
| 2841 | update_option('show_avatars', false); |
|
| 2842 | $request = new WP_REST_Request('OPTIONS', '/wp/v2/users'); |
|
| 2843 | $response = $this->server->dispatch($request); |
|
| 2844 | $data = $response->get_data(); |
|
| 2845 | $properties = $data['schema']['properties']; |
|
| 2846 | ||
| 2847 | $this->assertArrayNotHasKey('author_avatar_urls', $properties); |
|
| 2848 | } |
|
| 2849 | ||
| 2850 | public function test_get_additional_field_registration() |
|
| @@ 2128-2136 (lines=9) @@ | ||
| 2125 | ||
| 2126 | } |
|
| 2127 | ||
| 2128 | public function test_get_item_schema_show_avatar() |
|
| 2129 | { |
|
| 2130 | update_option('show_avatars', false); |
|
| 2131 | $request = new WP_REST_Request('OPTIONS', '/wp/v2/users'); |
|
| 2132 | $response = $this->server->dispatch($request); |
|
| 2133 | $data = $response->get_data(); |
|
| 2134 | $properties = $data['schema']['properties']; |
|
| 2135 | ||
| 2136 | $this->assertArrayNotHasKey('avatar_urls', $properties); |
|
| 2137 | } |
|
| 2138 | ||
| 2139 | public function test_get_additional_field_registration() |
|