From d6aece2a336225e239798e99f163b30e2e9d8874 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 2 Nov 2017 01:25:57 +0000 Subject: [PATCH] Bundled Themes: Fix fragile `update-theme` phpunit test which broke after version updates in [42105]. See #42090. git-svn-id: https://develop.svn.wordpress.org/trunk@42106 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/ManageThemes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/ajax/ManageThemes.php b/tests/phpunit/tests/ajax/ManageThemes.php index 481491d978..204c97c603 100644 --- a/tests/phpunit/tests/ajax/ManageThemes.php +++ b/tests/phpunit/tests/ajax/ManageThemes.php @@ -122,13 +122,14 @@ class Tests_Ajax_Manage_Themes extends WP_Ajax_UnitTestCase { // Get the response. $response = json_decode( $this->_last_response, true ); + $theme = wp_get_theme( 'twentyten' ); $expected = array( 'success' => false, 'data' => array( 'update' => 'theme', 'slug' => 'twentyten', 'errorMessage' => 'The theme is at the latest version.', - 'oldVersion' => '2.3', + 'oldVersion' => $theme->get( 'Version' ), 'newVersion' => '', 'debug' => array( 'The theme is at the latest version.' ), ),