Merge "TOC: Avoid Sizzle selectors"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / StaticArrayWriterTest.php
index bfb3b58..4bd845d 100644 (file)
 
 use Wikimedia\StaticArrayWriter;
 
+/**
+ * @covers \Wikimedia\StaticArrayWriter
+ */
 class StaticArrayWriterTest extends PHPUnit\Framework\TestCase {
        public function testCreate() {
                $data = [
                        '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" );
@@ -36,6 +42,14 @@ class StaticArrayWriterTest extends PHPUnit\Framework\TestCase {
 return [
        'foo' => 'bar',
        'baz' => 'rawr',
+       'they\'re' => '"quoted properly"',
+       'nested' => [
+               0 => 'elements',
+               1 => 'work',
+       ],
+       'and' => [
+               'these' => 'do too',
+       ],
 ];
 
 PHP;