From ce8d689ceb07b6f3260265c89e73e9f5332d2c4e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 1 Dec 2013 00:26:07 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/basic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index 4110d59b80..d5aba28b9d 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -26,7 +26,7 @@ class Tests_Basic extends WP_UnitTestCase { $readme = file_get_contents( ABSPATH . 'readme.html' ); preg_match( '#
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