- Timestamp:
- 03/16/2023 01:09:55 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php
r55407 r55555 39 39 $p->set_bookmark( 'first li' ); 40 40 $this->assertTrue( $p->release_bookmark( 'first li' ), 'Could not release a bookmark' ); 41 } 42 43 /** 44 * @ticket 57788 45 * 46 * @covers WP_HTML_Tag_Processor::has_bookmark 47 */ 48 public function test_has_bookmark_returns_false_if_bookmark_does_not_exist() { 49 $p = new WP_HTML_Tag_Processor( '<div>Test</div>' ); 50 $this->assertFalse( $p->has_bookmark( 'my-bookmark' ) ); 51 } 52 53 /** 54 * @ticket 57788 55 * 56 * @covers WP_HTML_Tag_Processor::has_bookmark 57 */ 58 public function test_has_bookmark_returns_true_if_bookmark_exists() { 59 $p = new WP_HTML_Tag_Processor( '<div>Test</div>' ); 60 $p->next_tag(); 61 $p->set_bookmark( 'my-bookmark' ); 62 $this->assertTrue( $p->has_bookmark( 'my-bookmark' ) ); 63 } 64 65 /** 66 * @ticket 57788 67 * 68 * @covers WP_HTML_Tag_Processor::has_bookmark 69 */ 70 public function test_has_bookmark_returns_false_if_bookmark_has_been_released() { 71 $p = new WP_HTML_Tag_Processor( '<div>Test</div>' ); 72 $p->next_tag(); 73 $p->set_bookmark( 'my-bookmark' ); 74 $p->release_bookmark( 'my-bookmark' ); 75 $this->assertFalse( $p->has_bookmark( 'my-bookmark' ) ); 41 76 } 42 77
Note: See TracChangeset
for help on using the changeset viewer.