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\FormatVariable;
use PHPUnit\Framework\TestCase;
use stdClass;
use function tmpfile;
class FormatVariableTest extends TestCase
{
/**
* @dataProvider provideDataForFormatVariable
*/
public function testFormatVariable($expected, $value) : void
self::assertSame($expected, (new FormatVariable())->__invoke($value));
}
* @return array<int, array<int, mixed>>
public function provideDataForFormatVariable() : array
return [
['', ''],
['test', 'test'],
['NULL', null],
['stdClass', new stdClass()],
['stream', tmpfile()],
['true', true],
['false', false],
['array', [true, 1, 2, 3, 'test']],
];