Skip to content

Commit

Permalink
Adds tests for identifier quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Sep 9, 2024
1 parent 495af05 commit 6f42893
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Engine/MySqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function testIdentifier(): void
$field = identify('id');

$this->assertSql('`id`', $field);

$field = identify('contains`backticks');

$this->assertSql('`contains``backticks`', $field);
}

public function testBooleanParameterValue(): void
Expand Down
4 changes: 4 additions & 0 deletions tests/Engine/PostgresTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ public function testIdentifier(): void
$field = identify('id');

$this->assertSql('"id"', $field);

$field = identify('contains"quotes');

$this->assertSql('"contains""quotes"', $field);
}
}
4 changes: 4 additions & 0 deletions tests/Engine/SqlServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function testIdentifier(): void
$field = identify('id');

$this->assertSql('[id]', $field);

$field = identify('contains[brackets]');

$this->assertSql('[contains[brackets]]]', $field);
}

public function testLike(): void
Expand Down
4 changes: 4 additions & 0 deletions tests/Engine/SqliteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function testIdentifier(): void
$field = identify('id');

$this->assertSql('"id"', $field);

$field = identify('contains"quotes');

$this->assertSql('"contains""quotes"', $field);
}

public function testBooleanParameterValue(): void
Expand Down

0 comments on commit 6f42893

Please sign in to comment.