diff options
author | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2021-04-22 09:56:11 +0200 |
---|---|---|
committer | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2021-04-23 12:02:42 +0200 |
commit | c1ee8250e9bc9c9c3161ca0ded3946fd2af1da7d (patch) | |
tree | ed0c960ea070ecc91b10bf708b70977f84080420 /tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php | |
parent | 74653506a88de1bdadbc927b201f9ac6967fab5f (diff) | |
download | mediawikicore-c1ee8250e9bc9c9c3161ca0ded3946fd2af1da7d.tar.gz mediawikicore-c1ee8250e9bc9c9c3161ca0ded3946fd2af1da7d.zip |
Remove unnecessary ->equalTo() from tests
This is the default anyway when using ->with(). The test code
becomes so much more readable without this, I would like to
argue. Let it just say "with these values".
Because of the way I split my changes into multiple patches
there are a few other changes in this patch I could not split,
e.g. removing unnecessary ->any(). This is the default anyway
and doesn't make the test more specific.
Change-Id: I34990799fa9258ba8dc64c7e78ec43f7903b7681
Diffstat (limited to 'tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php')
-rw-r--r-- | tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php index 499bcd230498..46878e52d27a 100644 --- a/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/AbstractPrimaryAuthenticationProviderTest.php @@ -54,8 +54,8 @@ class AbstractPrimaryAuthenticationProviderTest extends \MediaWikiIntegrationTes $provider->expects( $this->once() ) ->method( 'testUserExists' ) - ->with( $this->equalTo( 'foo' ) ) - ->will( $this->returnValue( true ) ); + ->with( 'foo' ) + ->willReturn( true ); $this->assertTrue( $provider->testUserCanAuthenticate( 'foo' ) ); } |