mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 22:03:41 +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>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||||
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
|
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
|
||||||
<exclude name="MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed" />
|
|
||||||
</rule>
|
</rule>
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
<arg name="extensions" value="php" />
|
<arg name="extensions" value="php" />
|
||||||
|
|
|
@ -69,9 +69,9 @@ class HooksTest extends MediaWikiLangTestCase {
|
||||||
( new Hooks() )->onSkinAfterContent( $data, $sk );
|
( new Hooks() )->onSkinAfterContent( $data, $sk );
|
||||||
|
|
||||||
if ( $enabled ) {
|
if ( $enabled ) {
|
||||||
$this->assertNotEmpty( $data, 'Cookie warning should be present' );
|
$this->assertNotSame( '', $data, 'Cookie warning should be present' );
|
||||||
} else {
|
} else {
|
||||||
$this->assertEmpty( $data, 'Cookie warning should not be present' );
|
$this->assertSame( '', $data, 'Cookie warning should not be present' );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue