for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Doctrine\Tests\DBAL\Exception;
use Doctrine\DBAL\Exception\FormatArray;
use PHPUnit\Framework\TestCase;
class FormatArrayTest extends TestCase
{
/**
* @dataProvider provideDataForFormatArray
*/
public function testFormatArray($expected, $array) : void
self::assertSame($expected, (new FormatArray())->__invoke($array));
}
* @return array<int, array<int, string|mixed[]>>
public function provideDataForFormatArray() : array
return [
['[]', []],
['[true]', [true]],
['["test"]', ['test']],
['["test1", "test2"]', ['test1', 'test2']],
];