Changeset 35329
- Timestamp:
- 10/21/2015 04:14:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/document-title.php
r35295 r35329 7 7 * @group document-title 8 8 */ 9 class Tests_ Document_Title extends WP_UnitTestCase {9 class Tests_General_DocumentTitle extends WP_UnitTestCase { 10 10 11 11 function setUp() { … … 66 66 $this->go_to( '/' ); 67 67 68 $this->expectOutputString( "<title>front-page – Test Blog</title>\n" );68 $this->expectOutputString( "<title>front-page – " . get_option( 'blogname' ) . "</title>\n" ); 69 69 _wp_render_title_tag(); 70 70 … … 77 77 add_filter( 'document_title_parts', array( $this, '_home_title_parts' ) ); 78 78 79 $this->expectOutputString( "<title> Test Blog– Just another WordPress site</title>\n" );79 $this->expectOutputString( "<title>" . get_option( 'blogname' ) . " – Just another WordPress site</title>\n" ); 80 80 _wp_render_title_tag(); 81 81 } … … 94 94 add_filter( 'document_title_parts', array( $this, '_paged_title_parts' ) ); 95 95 96 $this->expectOutputString( "<title> Test Blog– Page 4 – Just another WordPress site</title>\n" );96 $this->expectOutputString( "<title>" . get_option( 'blogname' ) . " – Page 4 – Just another WordPress site</title>\n" ); 97 97 _wp_render_title_tag(); 98 98 } … … 112 112 add_filter( 'document_title_parts', array( $this, '_singular_title_parts' ) ); 113 113 114 $this->expectOutputString( "<title>test_title – Test Blog</title>\n" );114 $this->expectOutputString( "<title>test_title – " . get_option( 'blogname' ) . "</title>\n" ); 115 115 _wp_render_title_tag(); 116 116 } … … 127 127 $this->go_to( '?cat=' . $this->category_id ); 128 128 129 $this->expectOutputString( "<title>test_category – Test Blog</title>\n" );129 $this->expectOutputString( "<title>test_category – " . get_option( 'blogname' ) . "</title>\n" ); 130 130 _wp_render_title_tag(); 131 131 } … … 134 134 $this->go_to( '?s=test_title' ); 135 135 136 $this->expectOutputString( "<title>Search Results for “test_title” – Test Blog</title>\n" );136 $this->expectOutputString( "<title>Search Results for “test_title” – " . get_option( 'blogname' ) . "</title>\n" ); 137 137 _wp_render_title_tag(); 138 138 } … … 141 141 $this->go_to( '?author=' . $this->author_id ); 142 142 143 $this->expectOutputString( "<title>test_author – Test Blog</title>\n" );143 $this->expectOutputString( "<title>test_author – " . get_option( 'blogname' ) . "</title>\n" ); 144 144 _wp_render_title_tag(); 145 145 } … … 160 160 $this->go_to( '?post_type=cpt' ); 161 161 162 $this->expectOutputString( "<title>test_cpt – Test Blog</title>\n" );162 $this->expectOutputString( "<title>test_cpt – " . get_option( 'blogname' ) . "</title>\n" ); 163 163 _wp_render_title_tag(); 164 164 } … … 167 167 $this->go_to( '?year=2015' ); 168 168 169 $this->expectOutputString( "<title>2015 – Test Blog</title>\n" );169 $this->expectOutputString( "<title>2015 – " . get_option( 'blogname' ) . "</title>\n" ); 170 170 _wp_render_title_tag(); 171 171 } … … 174 174 $this->go_to( '?monthnum=09' ); 175 175 176 $this->expectOutputString( "<title>September 2015 – Test Blog</title>\n" );176 $this->expectOutputString( "<title>September 2015 – " . get_option( 'blogname' ) . "</title>\n" ); 177 177 _wp_render_title_tag(); 178 178 } … … 181 181 $this->go_to( '?day=22' ); 182 182 183 $this->expectOutputString( "<title>September 22, 2015 – Test Blog</title>\n" );183 $this->expectOutputString( "<title>September 22, 2015 – " . get_option( 'blogname' ) . "</title>\n" ); 184 184 _wp_render_title_tag(); 185 185 } … … 188 188 $this->go_to( '?m=404' ); 189 189 190 $this->expectOutputString( "<title>Page not found – Test Blog</title>\n" );190 $this->expectOutputString( "<title>Page not found – " . get_option( 'blogname' ) . "</title>\n" ); 191 191 _wp_render_title_tag(); 192 192 } … … 197 197 add_filter( 'title_tag_parts', array( $this, '_paged_post_title_parts' ) ); 198 198 199 $this->expectOutputString( "<title>test_title – Page 4 – Test Blog</title>\n" );199 $this->expectOutputString( "<title>test_title – Page 4 – " . get_option( 'blogname' ) . "</title>\n" ); 200 200 _wp_render_title_tag(); 201 201 } … … 215 215 add_filter( 'document_title_parts', array( $this, '_rearrange_title_parts' ) ); 216 216 217 $this->expectOutputString( "<title> Test Blog– test_title</title>\n" );217 $this->expectOutputString( "<title>" . get_option( 'blogname' ) . " – test_title</title>\n" ); 218 218 _wp_render_title_tag(); 219 219 } … … 233 233 add_filter( 'document_title_separator', array( $this, '_change_title_separator' ) ); 234 234 235 $this->expectOutputString( "<title>test_title %% Test Blog</title>\n" );235 $this->expectOutputString( "<title>test_title %% " . get_option( 'blogname' ) . "</title>\n" ); 236 236 _wp_render_title_tag(); 237 237 }
Note: See TracChangeset
for help on using the changeset viewer.