Checking for proper quoting was suggested by Krinkle in CR.
Change-Id: I7fa599767017a5cfc82899bc4178de6cb34bdd02
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" );
return [
'foo' => 'bar',
'baz' => 'rawr',
+ 'they\'re' => '"quoted properly"',
];
PHP;