Changeset 53357 for trunk/tests/phpunit/tests/theme.php
- Timestamp:
- 05/06/2022 11:09:54 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/theme.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme.php
r53349 r53357 222 222 $path_to_readme_txt = $wp_theme->get_theme_root() . '/' . $wp_theme->get_stylesheet() . '/readme.txt'; 223 223 $this->assertFileExists( $path_to_readme_txt ); 224 224 225 $readme = file_get_contents( $path_to_readme_txt ); 225 226 $this_year = gmdate( 'Y' ); … … 227 228 preg_match( '#Copyright (\d+) WordPress.org#', $readme, $matches ); 228 229 if ( $matches ) { 229 $this->assertSame( $this_year, trim( $matches[1] ), "Bundled themes readme.txt's year needs to be updated to $this_year." ); 230 $readme_year = trim( $matches[1] ); 231 232 $this->assertSame( $this_year, $readme_year, "Bundled themes readme.txt's year needs to be updated to $this_year." ); 230 233 } 231 234 232 235 preg_match( '#Copyright 20\d\d-(\d+) WordPress.org#', $readme, $matches ); 233 236 if ( $matches ) { 234 $this->assertSame( $this_year, trim( $matches[1] ), "Bundled themes readme.txt's year needs to be updated to $this_year." ); 237 $readme_year = trim( $matches[1] ); 238 239 $this->assertSame( $this_year, $readme_year, "Bundled themes readme.txt's year needs to be updated to $this_year." ); 235 240 } 236 241 }
Note: See TracChangeset
for help on using the changeset viewer.