Changeset 41786 for trunk/tests/phpunit/tests/rewrite.php
- Timestamp:
- 10/06/2017 11:28:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rewrite.php
r40564 r41786 361 361 362 362 /** 363 * @ticket 39373 364 */ 365 public function test_url_to_postid_should_bail_when_host_does_not_match() { 366 $this->set_permalink_structure( '/%postname%/' ); 367 368 $post_id = self::factory()->post->create( array( 'post_name' => 'foo-bar-baz' ) ); 369 $permalink = get_permalink( $post_id ); 370 $url = str_replace( home_url(), 'http://some-other-domain.com', get_permalink( $post_id ) ); 371 372 $this->assertSame( $post_id, url_to_postid( $permalink ) ); 373 $this->assertSame( 0, url_to_postid( $url ) ); 374 } 375 376 /** 363 377 * @ticket 21970 364 378 */
Note: See TracChangeset
for help on using the changeset viewer.