for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Doctrine\Tests\DBAL\Functional\Platform;
use Doctrine\Tests\DbalFunctionalTestCase;
class QuotingTest extends DbalFunctionalTestCase
{
/**
* @dataProvider stringLiteralProvider
*/
public function testQuoteStringLiteral(string $string) : void
$platform = $this->_conn->getDatabasePlatform();
$query = $platform->getDummySelectSQL(
$platform->quoteStringLiteral($string)
);
self::assertSame($string, $this->_conn->fetchColumn($query));
}
* @return mixed[][]
public static function stringLiteralProvider() : iterable
return [
'backslash' => ['\\'],
'single-quote' => ["'"],
];