- Timestamp:
- 12/14/2025 08:10:25 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestUrlDetailsController.php
r60729 r61377 44 44 * URL placeholder. 45 45 * 46 * Even though the request is being intercepted with a mocked response, it is not fully bypassing the network. The 47 * REST API endpoint is validating the `url` parameter with `wp_http_validate_url()` which includes a call to 48 * `gethostbyname()`. So the domain used in the placeholder URL must be valid to ensure it passes a validity check. 49 * 46 50 * @since 5.9.0 47 51 * 48 52 * @var string 49 53 */ 50 const URL_PLACEHOLDER = 'https:// placeholder-site.com';54 const URL_PLACEHOLDER = 'https://example.com'; 51 55 52 56 /** … … 130 134 array( 131 135 'title' => 'Example Website — - with encoded content.', 132 'icon' => 'https:// placeholder-site.com/favicon.ico?querystringaddedfortesting',136 'icon' => 'https://example.com/favicon.ico?querystringaddedfortesting', 133 137 'description' => 'Example description text here. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.', 134 'image' => 'https:// placeholder-site.com/images/home/screen-themes.png?3',138 'image' => 'https://example.com/images/home/screen-themes.png?3', 135 139 ), 136 140 $data … … 445 449 $this->assertSame( 418, $data['status'], 'Response "status" is not 418' ); 446 450 447 $expected = 'Response for URL https:// placeholder-site.com altered via rest_prepare_url_details filter';451 $expected = 'Response for URL https://example.com altered via rest_prepare_url_details filter'; 448 452 $this->assertSame( $expected, $data['response'], 'Response "response" is not "' . $expected . '"' ); 449 453 }
Note: See TracChangeset
for help on using the changeset viewer.