Don't set actor on UserIdentityValue in tests.

The actor ID is being removed from UserIdentityValue. Non-zero values
are triggering a deprecation warning now.

Needed-By: I9925906d11e47efaec3c1f48d5cb3f9896a982c1
Change-Id: Id60e56e70f6e4b44f49887d9e5ae5a23b1fd19a2
This commit is contained in:
daniel 2021-02-22 12:21:38 +01:00 committed by Daniel Kinzler
parent cc3dbe149d
commit 63a497fb56

View file

@ -40,7 +40,7 @@ class BlockAutopromoteStoreTest extends MediaWikiUnitTestCase {
*/
public function testBlockAutopromote( BagOStuff $cache, bool $expected ) {
$store = $this->getStore( $cache );
$target = new UserIdentityValue( 1, 'Blocked user', 43 );
$target = new UserIdentityValue( 1, 'Blocked user', 0 );
$this->assertSame( $expected, $store->blockAutoPromote( $target, '', 1 ) );
}
@ -59,7 +59,7 @@ class BlockAutopromoteStoreTest extends MediaWikiUnitTestCase {
*/
public function testUnblockAutopromote( BagOStuff $cache, bool $expected ) {
$store = $this->getStore( $cache );
$target = new UserIdentityValue( 1, 'Blocked user', 43 );
$target = new UserIdentityValue( 1, 'Blocked user', 0 );
$this->assertSame( $expected, $store->unblockAutoPromote( $target, $target, '' ) );
}
@ -72,7 +72,7 @@ class BlockAutopromoteStoreTest extends MediaWikiUnitTestCase {
public function testRoundTrip() {
$cache = new HashBagOStuff();
$store = $this->getStore( $cache );
$target = new UserIdentityValue( 1, 'Blocked user', 43 );
$target = new UserIdentityValue( 1, 'Blocked user', 0 );
$this->assertTrue( $store->blockAutoPromote( $target, '', 3000 ), 'block' );
$this->assertSame( 1, $store->getAutoPromoteBlockStatus( $target ), 'should be blocked' );
$this->assertTrue( $store->unblockAutoPromote( $target, $target, '' ), 'can unblock' );