File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 257257 ->toContain ("updated_by CONSTANT 1, \n" )
258258 ->toContain ("updated_at EXPRESSION \"current_timestamp(3) \"\n" );
259259});
260+
261+ test ('it can set input file os file proc clause ' , function () {
262+ Process::fake ();
263+
264+ $ loader = new SQLLoader ();
265+ $ loader ->inFile (__DIR__ .'/../data/users.dat ' , osFileProcClause: 'os file proc ' )
266+ ->as ('users.ctl ' )
267+ ->withHeaders ()
268+ ->into ('users ' )
269+ ->execute ();
270+
271+ $ controlFile = $ loader ->buildControlFile ();
272+
273+ expect ($ controlFile )->toBeString ()
274+ ->toContain ("INFILE ' " .__DIR__ ."/../data/users.dat' \"os file proc \"" )
275+ ->toContain ('INTO TABLE users ' )
276+ ->toContain ('FIELDS TERMINATED BY \', \' OPTIONALLY ENCLOSED BY \'" \'' )
277+ ->toContain ('TRAILING NULLCOLS ' )
278+ ->toContain ('( ' )
279+ ->toContain ('"NAME", ' )
280+ ->toContain ('"EMAIL" ' )
281+ ->toContain (') ' );
282+ });
You can’t perform that action at this time.
0 commit comments