mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 13:56:53 +00:00
tests: Replace assert(Not)Empty with assert(Not)Same
assertSame avoids use of loose comparisons and allows to check the expected type Change-Id: Ia6f0cc449f42ef078eb69667d0ce1706022de19b
This commit is contained in:
parent
5b754dc615
commit
fd816a2a7c
|
@ -2,7 +2,6 @@
|
|||
<ruleset>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
|
||||
<exclude name="MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed" />
|
||||
</rule>
|
||||
<file>.</file>
|
||||
<arg name="extensions" value="php" />
|
||||
|
|
|
@ -69,9 +69,9 @@ class HooksTest extends MediaWikiLangTestCase {
|
|||
( new Hooks() )->onSkinAfterContent( $data, $sk );
|
||||
|
||||
if ( $enabled ) {
|
||||
$this->assertNotEmpty( $data, 'Cookie warning should be present' );
|
||||
$this->assertNotSame( '', $data, 'Cookie warning should be present' );
|
||||
} else {
|
||||
$this->assertEmpty( $data, 'Cookie warning should not be present' );
|
||||
$this->assertSame( '', $data, 'Cookie warning should not be present' );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue