Do not run CollationFaTest if 'intl' is not loaded
authorHuji Lee <huji.huji@gmail.com>
Sat, 16 Sep 2017 20:30:18 +0000 (16:30 -0400)
committerHuji Lee <huji.huji@gmail.com>
Sat, 16 Sep 2017 20:30:18 +0000 (16:30 -0400)
Bug: T176040
Change-Id: I6b19bf1123d4dca5a1c8e002c0de65bab2138180

tests/phpunit/includes/collation/CollationFaTest.php

index f230197..53a4f7b 100644 (file)
@@ -7,6 +7,13 @@ class CollationFaTest extends MediaWikiTestCase {
         * against a random version of libicu
         */
 
+       public function setUp() {
+               parent::setUp();
+               if ( !extension_loaded( 'intl' ) ) {
+                       $this->markTestSkipped( "PHP extension 'intl' is not loaded, skipping." );
+               }
+       }
+
        /**
         * @dataProvider provideGetFirstLetter
         */