Improve StaticArrayWriterTest and add missing @covers tag
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 19 Aug 2018 07:06:35 +0000 (00:06 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sun, 19 Aug 2018 07:07:03 +0000 (00:07 -0700)
Checking for proper quoting was suggested by Krinkle in CR.

Change-Id: I7fa599767017a5cfc82899bc4178de6cb34bdd02

tests/phpunit/includes/libs/StaticArrayWriterTest.php

index bfb3b58..276fee3 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"',
                ];
                $writer = new StaticArrayWriter();
                $actual = $writer->create( $data, "Header\nWith\nNewlines" );
@@ -36,6 +40,7 @@ class StaticArrayWriterTest extends PHPUnit\Framework\TestCase {
 return [
        'foo' => 'bar',
        'baz' => 'rawr',
+       'they\'re' => '"quoted properly"',
 ];
 
 PHP;