Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romantmb committed Jun 24, 2024
1 parent b306c97 commit 22f3c0d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"id","col-true-null","col-true-empty-string","col-true-string"
"1","Test sloupecku null-null","Test sloupecku true-null","Test sloupecku true-empty-string"
"2","","",""
"id","col-null-null","col-true-null","col-true-empty-string","col-true-string","col-false-null","col-false-empty-string","col-false-string"
"1","Test sloupecku null-null","Test sloupecku true-null","Test sloupecku true-empty-string","Test sloupecku true-string","Test sloupecku false-null","Test sloupecku false-empty-string","Test sloupecku false-string"
"2","","","","","","",""
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"nullable": null,
"default": null
},
{
"name": "col-null-null",
"dbName": "col-null-null",
"type": "varchar",
"size": 255,
"nullable": null,
"default": null
},
{
"name": "col-true-null",
"dbName": "col-true-null",
Expand All @@ -43,6 +51,30 @@
"size": 255,
"nullable": true,
"default": "test string"
},
{
"name": "col-false-null",
"dbName": "col-false-null",
"type": "varchar",
"size": 255,
"nullable": false,
"default": null
},
{
"name": "col-false-empty-string",
"dbName": "col-false-empty-string",
"type": "varchar",
"size": 255,
"nullable": false,
"default": ""
},
{
"name": "col-false-string",
"dbName": "col-false-string",
"type": "varchar",
"size": 255,
"nullable": false,
"default": "test string"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"columns": [
"id",
"col-null-null",
"col-true-null",
"col-true-empty-string",
"col-true-string"
"col-true-string",
"col-false-null",
"col-false-empty-string",
"col-false-string"
]
}
4 changes: 2 additions & 2 deletions tests/phpunit/SnowflakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ public function testGenerateCopyQuery(): void

$expected = "
COPY INTO \"$schema\".\"simple_temp\"(\"id\", \"name\", \"glasses\", \"age\")
FROM @~/simple_temp
FILE_FORMAT = (TYPE=CSV SKIP_HEADER = 1 FIELD_DELIMITER = ',' FIELD_OPTIONALLY_ENCLOSED_BY = '\\\"' ESCAPE_UNENCLOSED_FIELD = '\\\\' COMPRESSION = 'GZIP' NULL_IF = (''))
FROM (SELECT $1, $2, $3, IFF($4 = '', null, $4) FROM @~/simple_temp)
FILE_FORMAT = (TYPE=CSV SKIP_HEADER = 1 FIELD_DELIMITER = ',' FIELD_OPTIONALLY_ENCLOSED_BY = '\\\"' ESCAPE_UNENCLOSED_FIELD = '\\\\' COMPRESSION = 'GZIP')
;
";

Expand Down

0 comments on commit 22f3c0d

Please sign in to comment.