Make sure the version extracted from readme.html does not include a newline.

fixes #26344.

git-svn-id: https://develop.svn.wordpress.org/trunk@26489 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-12-01 00:26:07 +00:00
parent a754d62f49
commit ce8d689ceb
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Tests_Basic extends WP_UnitTestCase {
$readme = file_get_contents( ABSPATH . 'readme.html' );
preg_match( '#<br /> Version (.*)#', $readme, $matches );
list( $version ) = explode( '-', $GLOBALS['wp_version'] );
$this->assertEquals( $version, $matches[1], "readme.html's version needs to be updated to $version." );
$this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." );
}
// two tests for a lame bug in PHPUnit that broke the $GLOBALS reference