flux-querybuilder/tests/FormattersTest.php
davidarendsen 4c1a1a0af8 Fix Formatters::valueToString when is an array
Signed-off-by: davidarendsen <davidarendsen@hey.com>
2022-08-11 15:06:14 +00:00

21 lines
No EOL
455 B
PHP

<?php
declare(strict_types=1);
use Arendsen\FluxQueryBuilder\Formatters;
use PHPUnit\Framework\TestCase;
final class FormattersTest extends TestCase {
public function testAssociativeArrayNested()
{
$array = [
'columns' => ['foo', 'bar'],
'mode' => 'by'
];
$expected = 'columns: ["foo", "bar"], mode: "by"';
$this->assertEquals($expected, Formatters::toFluxArrayString($array));
}
}