mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-11-24 06:54:08 +00:00
tests: Make some PHPUnit data providers static
Initally used a new sniff with autofix (T333745) Bug: T332865 Change-Id: I659c128532ac8350ef8bac85141ffc71329f71b0
This commit is contained in:
parent
b20e68feb7
commit
76bf0ed8e3
|
@ -50,7 +50,7 @@ class LoginNotifyTest extends MediaWikiIntegrationTestCase {
|
||||||
$this->assertSame( $expected, $actual );
|
$this->assertSame( $expected, $actual );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideGetIPNetwork() {
|
public static function provideGetIPNetwork() {
|
||||||
return [
|
return [
|
||||||
[ '127.0.0.1', '127.0.0.' ],
|
[ '127.0.0.1', '127.0.0.' ],
|
||||||
[ '118.221.191.18', '118.221.191.' ],
|
[ '118.221.191.18', '118.221.191.' ],
|
||||||
|
@ -74,7 +74,7 @@ class LoginNotifyTest extends MediaWikiIntegrationTestCase {
|
||||||
$this->assertEquals( $expected, $actual );
|
$this->assertEquals( $expected, $actual );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideGenerateUserCookieRecord() {
|
public static function provideGenerateUserCookieRecord() {
|
||||||
return [
|
return [
|
||||||
[ 'Foo', 2011, 'a4321f', '2011-a4321f-8oerxg4l59zpiu0by7m2to1b4cjeer4' ],
|
[ 'Foo', 2011, 'a4321f', '2011-a4321f-8oerxg4l59zpiu0by7m2to1b4cjeer4' ],
|
||||||
[ 'Foo', 2011, 'A4321f', '2011-A4321f-in65gc2i9czojfopkeieijc0ek8j5vu' ],
|
[ 'Foo', 2011, 'A4321f', '2011-A4321f-in65gc2i9czojfopkeieijc0ek8j5vu' ],
|
||||||
|
@ -179,7 +179,7 @@ class LoginNotifyTest extends MediaWikiIntegrationTestCase {
|
||||||
$this->assertSame( 1, $res, "after clear" );
|
$this->assertSame( 1, $res, "after clear" );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideClearCounters() {
|
public static function provideClearCounters() {
|
||||||
return [
|
return [
|
||||||
[ 'new' ],
|
[ 'new' ],
|
||||||
[ 'known' ],
|
[ 'known' ],
|
||||||
|
@ -292,7 +292,7 @@ class LoginNotifyTest extends MediaWikiIntegrationTestCase {
|
||||||
$this->assertEquals( $expected, $this->inst->validateCookieRecord( $cookie ) );
|
$this->assertEquals( $expected, $this->inst->validateCookieRecord( $cookie ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function provideValidateCookieRecord() {
|
public static function provideValidateCookieRecord() {
|
||||||
$y = gmdate( 'Y' );
|
$y = gmdate( 'Y' );
|
||||||
return [
|
return [
|
||||||
[ 'fdakslnknfaknasf', false ],
|
[ 'fdakslnknfaknasf', false ],
|
||||||
|
|
Loading…
Reference in a new issue