Merge "DatabaseMssql: Don't duplicate body of makeList()"
[mediawiki.git] / tests / phpunit / includes / api / format / ApiFormatDbgTest.php
blob1e4ea53ccc4ce84a52ea35fc5e222cbeeb1d1ff1
1 <?php
3 /**
4 * @group API
5 * @covers ApiFormatDbg
6 */
7 class ApiFormatDbgTest extends ApiFormatTestBase {
9 protected $printerName = 'dbg';
11 public static function provideGeneralEncoding() {
12 $warning = "\n 'warnings' => \n array (\n 'dbg' => \n array (\n" .
13 " '*' => 'format=dbg has been deprecated. Please use format=json instead.',\n" .
14 " ),\n ),";
16 return array(
17 // Basic types
18 array( array( null ), "array ({$warning}\n 0 => NULL,\n)" ),
19 array( array( true ), "array ({$warning}\n 0 => true,\n)" ),
20 array( array( false ), "array ({$warning}\n 0 => false,\n)" ),
21 array( array( 42 ), "array ({$warning}\n 0 => 42,\n)" ),
22 array( array( 42.5 ), "array ({$warning}\n 0 => 42.5,\n)" ),
23 array( array( 1e42 ), "array ({$warning}\n 0 => 1.0E+42,\n)" ),
24 array( array( 'foo' ), "array ({$warning}\n 0 => 'foo',\n)" ),
25 array( array( 'fóo' ), "array ({$warning}\n 0 => 'fóo',\n)" ),
27 // Arrays and objects
28 array( array( array() ), "array ({$warning}\n 0 => \n array (\n ),\n)" ),
29 array( array( array( 1 ) ), "array ({$warning}\n 0 => \n array (\n 0 => 1,\n ),\n)" ),
30 array( array( array( 'x' => 1 ) ), "array ({$warning}\n 0 => \n array (\n 'x' => 1,\n ),\n)" ),
31 array( array( array( 2 => 1 ) ), "array ({$warning}\n 0 => \n array (\n 2 => 1,\n ),\n)" ),
33 // Content
34 array( array( '*' => 'foo' ), "array ({$warning}\n '*' => 'foo',\n)" ),