Deprecate wfArrayFilter() and wfArrayFilterByKey()
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / wfArrayFilterTest.php
index 388aee7..bc930be 100644 (file)
@@ -1,7 +1,13 @@
 <?php
 
-class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
+/**
+ * @group GlobalFunctions
+ * @covers ::wfArrayFilter
+ * @covers ::wfArrayFilterByKey
+ */
+class WfArrayFilterTest extends MediaWikiTestCase {
        public function testWfArrayFilter() {
+               $this->hideDeprecated( 'wfArrayFilter' );
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
                $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
                        return $key !== 'b';
@@ -22,6 +28,7 @@ class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
        }
 
        public function testWfArrayFilterByKey() {
+               $this->hideDeprecated( 'wfArrayFilterByKey' );
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
                $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
                        return $key !== 'b';