- Timestamp:
- 07/18/2018 11:51:06 AM (8 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/link/getThePrivacyPolicyLink.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/tests/phpunit/tests/link/getThePrivacyPolicyLink.php
r43109 r43507 72 72 /** 73 73 * The function should return a valid link if a privacy policy page has been 74 * created and set as the `wp_page_for_privacy_policy`. 74 * created and set as the `wp_page_for_privacy_policy`. The post title should 75 * be used as the link text. 75 76 */ 76 77 public function test_get_the_privacy_policy_link_should_return_valid_link_when_privacy_page_set() { … … 81 82 $this->assertStringStartsWith( '<a', $actual_link ); 82 83 $this->assertContains( self::$privacy_policy_url, $actual_link ); 83 $this->assertStringEndsWith( ' </a>', $actual_link );84 $this->assertStringEndsWith( '>' . WP_TESTS_DOMAIN . ' Privacy Policy</a>', $actual_link ); 84 85 } 85 86 … … 106 107 107 108 $this->assertSame( '', $actual_link ); 109 } 110 111 /** 112 * The function should return an empty string when there is an empty page title 113 * for the privacy policy. 114 * 115 * @ticket 44192 116 */ 117 public function test_function_should_return_empty_string_when_privacy_page_title_empty() { 118 $nameless_page_id = $this->factory->post->create( 119 array( 120 'post_type' => 'page', 121 'post_title' => '', 122 ) 123 ); 124 125 update_option( 'wp_page_for_privacy_policy', $nameless_page_id ); 126 127 $this->assertSame( '', get_the_privacy_policy_link( self::$before, self::$after ) ); 108 128 } 109 129
Note: See TracChangeset
for help on using the changeset viewer.