X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FCollationTest.php;h=c6a7169cab1fe895b4821c3b277c5f585a8c662f;hb=d6c2fcb8c4b7772ef52b6ce3e7b10f82d1da5a2b;hp=ae35fd7a42603c98dbaf5485c6725bed5fa5b8cc;hpb=a492cf4c3498edbea090c5eccc2515b4d4a1724b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/CollationTest.php b/tests/phpunit/includes/CollationTest.php index ae35fd7a42..c6a7169cab 100644 --- a/tests/phpunit/includes/CollationTest.php +++ b/tests/phpunit/includes/CollationTest.php @@ -1,8 +1,16 @@ markTestSkipped( 'These tests require intl extension' ); } } @@ -20,7 +28,7 @@ class CollationTest extends MediaWikiLangTestCase { * * @dataProvider prefixDataProvider */ - function testIsPrefix( $lang, $base, $extended ) { + public function testIsPrefix( $lang, $base, $extended ) { $cp = Collator::create( $lang ); $cp->setStrength( Collator::PRIMARY ); $baseBin = $cp->getSortKey( $base ); @@ -30,7 +38,7 @@ class CollationTest extends MediaWikiLangTestCase { $this->assertStringStartsWith( $baseBin, $extendedBin, "$base is not a prefix of $extended" ); } - function prefixDataProvider() { + public static function prefixDataProvider() { return array( array( 'en', 'A', 'AA' ), array( 'en', 'A', 'AAA' ), @@ -53,7 +61,7 @@ class CollationTest extends MediaWikiLangTestCase { * * @dataProvider notPrefixDataProvider */ - function testNotIsPrefix( $lang, $base, $extended ) { + public function testNotIsPrefix( $lang, $base, $extended ) { $cp = Collator::create( $lang ); $cp->setStrength( Collator::PRIMARY ); $baseBin = $cp->getSortKey( $base ); @@ -63,7 +71,7 @@ class CollationTest extends MediaWikiLangTestCase { $this->assertStringStartsNotWith( $baseBin, $extendedBin, "$base is a prefix of $extended" ); } - function notPrefixDataProvider() { + public static function notPrefixDataProvider() { return array( array( 'en', 'A', 'B' ), array( 'en', 'AC', 'ABC' ), @@ -81,7 +89,7 @@ class CollationTest extends MediaWikiLangTestCase { * * @dataProvider firstLetterProvider */ - function testGetFirstLetter( $collation, $string, $firstLetter ) { + public function testGetFirstLetter( $collation, $string, $firstLetter ) { $col = Collation::factory( $collation ); $this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) ); }