File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -3665,4 +3665,23 @@ public function testColumnDefaults(): void {
36653665 $ result [0 ]->{'Create Table ' }
36663666 );
36673667 }
3668+
3669+ public function testSelectNonExistentColumn (): void {
3670+ $ this ->assertQuery (
3671+ 'CREATE TABLE t (id INT) '
3672+ );
3673+
3674+ /*
3675+ * Here, we're basically testing that identifiers are escaped using
3676+ * backticks instead of double quotes. In SQLite, double quotes may
3677+ * fallback to a string literal and thus produce no error.
3678+ *
3679+ * See:
3680+ * https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted
3681+ */
3682+ $ this ->assertQuery (
3683+ 'SELECT non_existent_column FROM t LIMIT 0 ' ,
3684+ 'no such column: non_existent_column '
3685+ );
3686+ }
36683687}
You can’t perform that action at this time.
0 commit comments