diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2023-01-07 15:09:18 +0100 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2023-01-13 21:03:42 +0000 |
commit | abf2ea44e8c96cbfa61a028e5deceaad9354b970 (patch) | |
tree | ee33af308928d09393b47fe2e65b617d0cbf508b /tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php | |
parent | 860479d880941e502a9e3ea7150d844652356536 (diff) | |
download | mediawikicore-abf2ea44e8c96cbfa61a028e5deceaad9354b970.tar.gz mediawikicore-abf2ea44e8c96cbfa61a028e5deceaad9354b970.zip |
tests: Handle dynamic created properties on test classes
- Declare missing properties
- Remove unused or avoid set of properties
- Add AllowDynamicProperties
Bug: T314099
Change-Id: Ie631894f2ffbb616f6dd09851405d681f3eb8fcd
Diffstat (limited to 'tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php')
-rw-r--r-- | tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php index 5f944a44d733..100271a30549 100644 --- a/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php @@ -67,7 +67,6 @@ class AbstractPrimaryAuthenticationProviderTest extends \MediaWikiIntegrationTes $reqs = []; for ( $i = 0; $i < 3; $i++ ) { $reqs[$i] = $this->createMock( AuthenticationRequest::class ); - $reqs[$i]->done = false; } $provider = $this->getMockForAbstractClass( AbstractPrimaryAuthenticationProvider::class ); @@ -80,14 +79,12 @@ class AbstractPrimaryAuthenticationProviderTest extends \MediaWikiIntegrationTes $provider->expects( $this->exactly( 3 ) )->method( 'providerChangeAuthenticationData' ) ->willReturnCallback( function ( $req ) { $this->assertSame( 'UTSysop', $req->username ); - $this->assertFalse( $req->done ); - $req->done = true; } ); $provider->providerRevokeAccessForUser( 'UTSysop' ); foreach ( $reqs as $i => $req ) { - $this->assertTrue( $req->done, "#$i" ); + $this->assertNotNull( $req->username, "#$i" ); } } |