mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-08-01 10:44:26 +02:00
add test for single quotes
This commit is contained in:
@@ -433,6 +433,22 @@ final class rewriteTest extends TestCase
|
|||||||
$this->assertSame(trim($expected), trim($postgresql));
|
$this->assertSame(trim($expected), trim($postgresql));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_it_doesnt_remove_single_quotes()
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT COUNT(*) FROM wp_comments WHERE user_id = 5 AND comment_approved = '1'
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$expected = <<<SQL
|
||||||
|
SELECT COUNT(*) FROM wp_comments WHERE user_id = 5 AND comment_approved = '1'
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$postgresql = pg4wp_rewrite($sql);
|
||||||
|
$this->assertSame(trim($expected), trim($postgresql));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user