X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2Fquery%2FApiQueryTestBase.php;h=e7588cb5dce8b2ccfb42826631ae42640e44c414;hb=631c7f09c53017da49a1e0f99d52fd2c4cf95641;hp=d5fa4542082e35bf61016b27bdcb7e90d2e723e5;hpb=77111ce4f24495f89e4d06880803e67e82d07484;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/query/ApiQueryTestBase.php b/tests/phpunit/includes/api/query/ApiQueryTestBase.php index d5fa454208..e7588cb5dc 100644 --- a/tests/phpunit/includes/api/query/ApiQueryTestBase.php +++ b/tests/phpunit/includes/api/query/ApiQueryTestBase.php @@ -1,7 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -38,15 +36,15 @@ STR; * @return array */ protected function merge( /*...*/ ) { - $request = array(); - $expected = array(); + $request = []; + $expected = []; foreach ( func_get_args() as $v ) { list( $req, $exp ) = $this->validateRequestExpectedPair( $v ); $request = array_merge_recursive( $request, $req ); $this->mergeExpected( $expected, $exp ); } - return array( $request, $expected ); + return [ $request, $expected ]; } /** @@ -100,17 +98,13 @@ STR; if ( !array_key_exists( 'action', $req ) ) { $req['action'] = 'query'; } - // Silence warning - if ( !isset( $params['continue'] ) ) { - $params['continue'] = ''; - } foreach ( $req as &$val ) { if ( is_array( $val ) ) { $val = implode( '|', array_unique( $val ) ); } } $result = $this->doApiRequest( $req, $session, $appendModule, $user ); - $this->assertResult( array( 'batchcomplete' => true, 'query' => $exp ), $result[0], $req ); + $this->assertResult( [ 'batchcomplete' => true, 'query' => $exp ], $result[0], $req ); } protected function assertResult( $exp, $result, $message = '' ) {