dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deprecate wfArrayFilter() and wfArrayFilterByKey()
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
GlobalFunctions
/
wfArrayFilterTest.php
diff --git
a/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
b/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
index
388aee7
..
bc930be
100644
(file)
--- a/
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
+++ b/
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
@@
-1,7
+1,13
@@
<?php
<?php
-class WfArrayFilterTest extends \PHPUnit_Framework_TestCase {
+/**
+ * @group GlobalFunctions
+ * @covers ::wfArrayFilter
+ * @covers ::wfArrayFilterByKey
+ */
+class WfArrayFilterTest extends MediaWikiTestCase {
public function testWfArrayFilter() {
public function testWfArrayFilter() {
+ $this->hideDeprecated( 'wfArrayFilter' );
$arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
$filtered = wfArrayFilter( $arr, function ( $val, $key ) {
return $key !== 'b';
$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() {
}
public function testWfArrayFilterByKey() {
+ $this->hideDeprecated( 'wfArrayFilterByKey' );
$arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
$filtered = wfArrayFilterByKey( $arr, function ( $key ) {
return $key !== 'b';
$arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
$filtered = wfArrayFilterByKey( $arr, function ( $key ) {
return $key !== 'b';