259 | | } |
260 | | No newline at end of file |
| 259 | |
| 260 | public function test_wp_make_link_relative() { |
| 261 | $link = 'http://example.com/this-is-a-test-http-url/'; |
| 262 | $relative_link = wp_make_link_relative( $link ); |
| 263 | $this->assertEquals( '/this-is-a-test-http-url/', $relative_link ); |
| 264 | |
| 265 | $link = 'https://example.com/this-is-a-test-https-url/'; |
| 266 | $relative_link = wp_make_link_relative( $link ); |
| 267 | $this->assertEquals( '/this-is-a-test-https-url/', $relative_link ); |
| 268 | |
| 269 | $link = '//example.com/this-is-a-test-schemeless-url/'; |
| 270 | $relative_link = wp_make_link_relative( $link ); |
| 271 | $this->assertEquals( '/this-is-a-test-schemeless-url/', $relative_link ); |
| 272 | } |
| 273 | } |