7 class ApiFormatTxtTest
extends ApiFormatTestBase
{
9 protected $printerName = 'txt';
11 public static function provideGeneralEncoding() {
12 $warning = "\n [warnings] => Array\n (\n [txt] => Array\n (\n" .
13 " [*] => format=txt has been deprecated. Please use format=json instead.\n" .
18 array( array( null ), "Array\n({$warning}\n [0] => \n)\n" ),
19 array( array( true ), "Array\n({$warning}\n [0] => 1\n)\n" ),
20 array( array( false ), "Array\n({$warning}\n [0] => \n)\n" ),
21 array( array( 42 ), "Array\n({$warning}\n [0] => 42\n)\n" ),
22 array( array( 42.5 ), "Array\n({$warning}\n [0] => 42.5\n)\n" ),
23 array( array( 1e42
), "Array\n({$warning}\n [0] => 1.0E+42\n)\n" ),
24 array( array( 'foo' ), "Array\n({$warning}\n [0] => foo\n)\n" ),
25 array( array( 'fóo' ), "Array\n({$warning}\n [0] => fóo\n)\n" ),
28 array( array( array() ), "Array\n({$warning}\n [0] => Array\n (\n )\n\n)\n" ),
29 array( array( array( 1 ) ), "Array\n({$warning}\n [0] => Array\n (\n [0] => 1\n )\n\n)\n" ),
30 array( array( array( 'x' => 1 ) ), "Array\n({$warning}\n [0] => Array\n (\n [x] => 1\n )\n\n)\n" ),
31 array( array( array( 2 => 1 ) ), "Array\n({$warning}\n [0] => Array\n (\n [2] => 1\n )\n\n)\n" ),
34 array( array( '*' => 'foo' ), "Array\n({$warning}\n [*] => foo\n)\n" ),