diff options
author | Kunal Mehta <legoktm@member.fsf.org> | 2018-08-19 03:15:31 -0700 |
---|---|---|
committer | Krinkle <krinklemail@gmail.com> | 2018-08-27 22:23:02 +0000 |
commit | 8a3bdfc633d04cc151ffbcd7e1b41edac4c8c4f9 (patch) | |
tree | c93bf799e3d94b36dd8438e30d33338ee1f8e576 /tests/phpunit/includes/libs/StaticArrayWriterTest.php | |
parent | 9b140b4fc6d4aed0152f5717ccafb78bba1f08fc (diff) | |
download | mediawikicore-8a3bdfc633d04cc151ffbcd7e1b41edac4c8c4f9.tar.gz mediawikicore-8a3bdfc633d04cc151ffbcd7e1b41edac4c8c4f9.zip |
Support nested arrays in StaticArrayWriter
This is needed by LCStoreStaticArray.
Bug: T200626
Change-Id: I76abd3849381b3b98e350a4627f3515eeb00fa2d
Diffstat (limited to 'tests/phpunit/includes/libs/StaticArrayWriterTest.php')
-rw-r--r-- | tests/phpunit/includes/libs/StaticArrayWriterTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/phpunit/includes/libs/StaticArrayWriterTest.php b/tests/phpunit/includes/libs/StaticArrayWriterTest.php index 276fee3f6c72..4bd845d0b992 100644 --- a/tests/phpunit/includes/libs/StaticArrayWriterTest.php +++ b/tests/phpunit/includes/libs/StaticArrayWriterTest.php @@ -29,6 +29,8 @@ class StaticArrayWriterTest extends PHPUnit\Framework\TestCase { 'foo' => 'bar', 'baz' => 'rawr', "they're" => '"quoted properly"', + 'nested' => [ 'elements', 'work' ], + 'and' => [ 'these' => 'do too' ], ]; $writer = new StaticArrayWriter(); $actual = $writer->create( $data, "Header\nWith\nNewlines" ); @@ -41,6 +43,13 @@ return [ 'foo' => 'bar', 'baz' => 'rawr', 'they\'re' => '"quoted properly"', + 'nested' => [ + 0 => 'elements', + 1 => 'work', + ], + 'and' => [ + 'these' => 'do too', + ], ]; PHP; |