Merge "Fix \n handling for HTMLUsersMultiselectField"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / wfArrayFilterTest.php
index afd80ff..388aee7 100644 (file)
@@ -3,19 +3,19 @@
 class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
        public function testWfArrayFilter() {
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function( $val, $key ) {
+               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
                        return $key !== 'b';
                } );
                $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
 
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function( $val, $key ) {
+               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
                        return $val !== 2;
                } );
                $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
 
                $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilter( $arr, function( $val, $key ) {
+               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
                        return $key !== 0;
                } );
                $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );
@@ -23,13 +23,13 @@ class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
 
        public function testWfArrayFilterByKey() {
                $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilterByKey( $arr, function( $key ) {
+               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
                        return $key !== 'b';
                } );
                $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
 
                $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilterByKey( $arr, function( $key ) {
+               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
                        return $key !== 0;
                } );
                $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );