tests: Replace assertEmpty with assertSame

assertSame avoids use of loose comparisons and
allows to check the expected type

Change-Id: I4e1efb254365ed551c1240c6ab7a8a270969a1d0
This commit is contained in:
Umherirrender 2022-11-24 23:02:46 +01:00
parent 719f5a2eae
commit cb6254fe5f
2 changed files with 1 additions and 2 deletions

View file

@ -4,7 +4,6 @@
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
<exclude name="MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed" />
</rule>
<file>.</file>
<arg name="extensions" value="php"/>

View file

@ -66,7 +66,7 @@ class CaptchaPreAuthenticationProviderTest extends MediaWikiIntegrationTestCase
$this->assertCount( 1, $reqs );
$this->assertInstanceOf( CaptchaAuthenticationRequest::class, $reqs[0] );
} else {
$this->assertEmpty( $reqs );
$this->assertSame( [], $reqs );
}
}