test(user-picker): fix PHPUnit 12 dataprovider deprecations

Eliminates PHPUnit deprecation notices (due to @dataProvider use) that were introduced via #57539.

Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
Josh 2026-02-20 21:47:21 -05:00 committed by GitHub
parent 5a5f82c52e
commit 07c614d2bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,9 +273,8 @@ class ProfilePickerReferenceProviderTest extends \Test\TestCase {
/**
* Resolved reference should contain the expected reference fields according to account property scope
*
* @dataProvider resolveReferenceDataProvider
*/
#[DataProvider('resolveReferenceDataProvider')]
public function testResolveReference($expected, $reference, $userId) {
if (isset($userId)) {
$expectedReference = $this->setupUserAccountReferenceExpectation($userId);
@ -291,15 +290,15 @@ class ProfilePickerReferenceProviderTest extends \Test\TestCase {
}
/**
* @dataProvider referenceDataProvider
*/
#[DataProvider('referenceDataProvider')]
public function testMatchReference($expected, $reference) {
$this->assertEquals($expected, $this->referenceProvider->matchReference($reference));
}
/**
* @dataProvider cacheKeyDataProvider
*/
#[DataProvider('cacheKeyDataProvider')]
public function testGetCacheKey($expected, $reference) {
$this->assertEquals($expected, $this->referenceProvider->getCacheKey($reference));
}
@ -319,16 +318,15 @@ class ProfilePickerReferenceProviderTest extends \Test\TestCase {
/**
* Test getObjectId method.
* It should return the userid extracted from the link (http(s)://domain.com/(index.php)/u/{userid}).
*
* @dataProvider objectIdDataProvider
*/
#[DataProvider('objectIdDataProvider')]
public function testGetObjectId($expected, $reference) {
$this->assertEquals($expected, $this->referenceProvider->getObjectId($reference));
}
/**
* @dataProvider locationDataProvider
*/
#[DataProvider('locationDataProvider')]
public function testGetOpenStreetLocationUrl($expected, $location) {
$this->assertEquals($expected, $this->referenceProvider->getOpenStreetLocationUrl($location));
}