aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php
diff options
context:
space:
mode:
authorLegoktm <legoktm@member.fsf.org>2019-06-13 23:00:08 +0000
committerLegoktm <legoktm@member.fsf.org>2019-06-13 23:00:08 +0000
commit4e35134f7a3228a8195a07f49c85188e57ab8487 (patch)
treed9750a18496af4c52eb5dfce56f0d0b79fbd32cb /tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php
parent0a2b996278e57a8b8c5377cd3a3eaa54f993d4a9 (diff)
downloadmediawikicore-4e35134f7a3228a8195a07f49c85188e57ab8487.tar.gz
mediawikicore-4e35134f7a3228a8195a07f49c85188e57ab8487.zip
Revert "Separate MediaWiki unit and integration tests"
This reverts commit 0a2b996278e57a8b8c5377cd3a3eaa54f993d4a9. Reason for revert: Broke postgres tests. Change-Id: I27d8e0c807ad5f0748b9611a4f3df84cc213fbe1
Diffstat (limited to 'tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php')
-rw-r--r--tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php94
1 files changed, 0 insertions, 94 deletions
diff --git a/tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php b/tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php
deleted file mode 100644
index 3e65af52126c..000000000000
--- a/tests/phpunit/unit/includes/GlobalFunctions/wfArrayPlus2dTest.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * @group GlobalFunctions
- * @covers ::wfArrayPlus2d
- */
-class WfArrayPlus2dTest extends \MediaWikiUnitTestCase {
- /**
- * @dataProvider provideArrays
- */
- public function testWfArrayPlus2d( $baseArray, $newValues, $expected, $testName ) {
- $this->assertEquals(
- $expected,
- wfArrayPlus2d( $baseArray, $newValues ),
- $testName
- );
- }
-
- /**
- * Provider for testing wfArrayPlus2d
- *
- * @return array
- */
- public static function provideArrays() {
- return [
- // target array, new values array, expected result
- [
- [ 0 => '1dArray' ],
- [ 1 => '1dArray' ],
- [ 0 => '1dArray', 1 => '1dArray' ],
- "Test simple union of two arrays with different keys",
- ],
- [
- [
- 0 => [ 0 => '2dArray' ],
- ],
- [
- 0 => [ 1 => '2dArray' ],
- ],
- [
- 0 => [ 0 => '2dArray', 1 => '2dArray' ],
- ],
- "Test union of 2d arrays with different keys in the value array",
- ],
- [
- [
- 0 => [ 0 => '2dArray' ],
- ],
- [
- 0 => [ 0 => '1dArray' ],
- ],
- [
- 0 => [ 0 => '2dArray' ],
- ],
- "Test union of 2d arrays with same keys in the value array",
- ],
- [
- [
- 0 => [ 0 => [ 0 => '3dArray' ] ],
- ],
- [
- 0 => [ 0 => [ 1 => '2dArray' ] ],
- ],
- [
- 0 => [ 0 => [ 0 => '3dArray' ] ],
- ],
- "Test union of 3d array with different keys",
- ],
- [
- [
- 0 => [ 0 => [ 0 => '3dArray' ] ],
- ],
- [
- 0 => [ 1 => [ 0 => '2dArray' ] ],
- ],
- [
- 0 => [ 0 => [ 0 => '3dArray' ], 1 => [ 0 => '2dArray' ] ],
- ],
- "Test union of 3d array with different keys in the value array",
- ],
- [
- [
- 0 => [ 0 => [ 0 => '3dArray' ] ],
- ],
- [
- 0 => [ 0 => [ 0 => '2dArray' ] ],
- ],
- [
- 0 => [ 0 => [ 0 => '3dArray' ] ],
- ],
- "Test union of 3d array with same keys in the value array",
- ],
- ];
- }
-}