tests: Match deprecation message under php8.4 in DeprecationHelperTest

php8.4 prints more information into the string "{closure}".
The text is now "{closure:DeprecationHelperTest::testSet():124}"

Change-Id: I4c54a089ad981ba03da21f50cbeebb48ea8e1d28
(cherry picked from commit eea57fa92c043a1e0571b24d7a88a8d7f0ed3bf7)
This commit is contained in:
Umherirrender 2024-12-13 21:25:34 +01:00 committed by Reedy
parent b4460215be
commit 20d15ad97f

View file

@ -41,19 +41,19 @@ class DeprecationHelperTest extends MediaWikiIntegrationTestCase {
return [
[ 'protectedDeprecated', null,
'Use of TestDeprecatedClass::$protectedDeprecated was deprecated in MediaWiki 1.23. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'privateDeprecated', null,
'Use of TestDeprecatedClass::$privateDeprecated was deprecated in MediaWiki 1.24. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackDeprecated', null,
'Use of TestDeprecatedClass::$fallbackDeprecated was deprecated in MediaWiki 1.25. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackDeprecatedMethodName', null,
'Use of TestDeprecatedClass::$fallbackDeprecatedMethodName was deprecated in MediaWiki 1.26. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackGetterOnly', null,
'Use of TestDeprecatedClass::$fallbackGetterOnly was deprecated in MediaWiki 1.25. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'protectedNonDeprecated', E_USER_ERROR,
'Cannot access non-public property TestDeprecatedClass::$protectedNonDeprecated' ],
[ 'privateNonDeprecated', E_USER_ERROR,
@ -74,7 +74,7 @@ class DeprecationHelperTest extends MediaWikiIntegrationTestCase {
$testObject->dynamic_property = 'bla';
},
'Use of TestDeprecatedClass::$dynamic_property was deprecated in MediaWiki 1.23. ' .
'[Called from DeprecationHelperTest::{closure}'
'[Called from DeprecationHelperTest::{closure'
);
}
@ -95,7 +95,7 @@ class DeprecationHelperTest extends MediaWikiIntegrationTestCase {
$this->assertSame( 'bla', $testObject->dynamic_property ?? 'bla' );
},
'Use of TestDeprecatedClass::$dynamic_property was deprecated in MediaWiki 1.23. ' .
'[Called from DeprecationHelperTest::{closure}'
'[Called from DeprecationHelperTest::{closure'
);
}
@ -135,16 +135,16 @@ class DeprecationHelperTest extends MediaWikiIntegrationTestCase {
return [
[ 'protectedDeprecated', null,
'Use of TestDeprecatedClass::$protectedDeprecated was deprecated in MediaWiki 1.23. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'privateDeprecated', null,
'Use of TestDeprecatedClass::$privateDeprecated was deprecated in MediaWiki 1.24. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackDeprecated', null,
'Use of TestDeprecatedClass::$fallbackDeprecated was deprecated in MediaWiki 1.25. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackDeprecatedMethodName', null,
'Use of TestDeprecatedClass::$fallbackDeprecatedMethodName was deprecated in MediaWiki 1.26. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
[ 'fallbackGetterOnly', E_USER_ERROR,
'Cannot access non-public property TestDeprecatedClass::$fallbackGetterOnly' ],
[ 'protectedNonDeprecated', E_USER_ERROR,
@ -153,7 +153,7 @@ class DeprecationHelperTest extends MediaWikiIntegrationTestCase {
'Cannot access non-public property TestDeprecatedClass::$privateNonDeprecated', 1 ],
[ 'nonExistent', null,
'Use of TestDeprecatedClass::$nonExistent was deprecated in MediaWiki 1.23. ' .
'[Called from DeprecationHelperTest::{closure}' ],
'[Called from DeprecationHelperTest::{closure' ],
];
}