X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/tests/phpunit/includes/api/format/ApiFormatNoneTest.php diff --git a/tests/phpunit/includes/api/format/ApiFormatNoneTest.php b/tests/phpunit/includes/api/format/ApiFormatNoneTest.php new file mode 100644 index 00000000..87e36703 --- /dev/null +++ b/tests/phpunit/includes/api/format/ApiFormatNoneTest.php @@ -0,0 +1,51 @@ + 1 ] ], '' ], + [ [ [ 2 => 1 ] ], '' ], + [ [ (object)[] ], '' ], + [ [ [ 1, ApiResult::META_TYPE => 'assoc' ] ], '' ], + [ [ [ 'x' => 1, ApiResult::META_TYPE => 'array' ] ], '' ], + [ [ [ 'x' => 1, ApiResult::META_TYPE => 'kvp' ] ], '' ], + [ + [ [ + 'x' => 1, + ApiResult::META_TYPE => 'BCkvp', + ApiResult::META_KVP_KEY_NAME => 'key' + ] ], + '' + ], + [ [ [ 'x' => 1, ApiResult::META_TYPE => 'BCarray' ] ], '' ], + [ [ [ 'a', 'b', ApiResult::META_TYPE => 'BCassoc' ] ], '' ], + + // Content + [ [ '*' => 'foo' ], '' ], + + // BC Subelements + [ [ 'foo' => 'foo', ApiResult::META_BC_SUBELEMENTS => [ 'foo' ] ], '' ], + ]; + } + +}