44
55namespace Flow \ETL \Tests \Unit ;
66
7- use function Flow \ETL \DSL \{bool_entry , int_entry , join_on , row , rows , str_entry };
7+ use function Flow \ETL \DSL \{bool_entry , config , flow_context , int_entry , join_on , row , rows , str_entry };
88use Flow \ETL \Exception \{DuplicatedEntriesException , InvalidArgumentException };
99use Flow \ETL \Join \Expression ;
1010use Flow \ETL \Tests \FlowTestCase ;
@@ -335,7 +335,8 @@ public function test_left_join() : void
335335 row (str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
336336 row (str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
337337 ),
338- Expression::on (['country ' => 'code ' ], 'joined_ ' )
338+ Expression::on (['country ' => 'code ' ], 'joined_ ' ),
339+ flow_context (config ())->entryFactory (),
339340 );
340341
341342 self ::assertEquals (
@@ -358,7 +359,8 @@ public function test_left_join_empty() : void
358359
359360 $ joined = $ left ->joinLeft (
360361 rows (),
361- Expression::on (['country ' => 'code ' ])
362+ Expression::on (['country ' => 'code ' ]),
363+ flow_context (config ())->entryFactory (),
362364 );
363365
364366 self ::assertEquals (
@@ -381,7 +383,8 @@ public function test_left_join_empty_without_prefix() : void
381383
382384 $ joined = $ left ->joinLeft (
383385 rows (),
384- Expression::on (['country_code ' => 'country_code ' ])
386+ Expression::on (['country_code ' => 'country_code ' ]),
387+ flow_context (config ())->entryFactory (),
385388 );
386389
387390 self ::assertEquals (
@@ -404,7 +407,8 @@ public function test_left_join_to_empty() : void
404407 row (str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
405408 row (str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
406409 ),
407- Expression::on (['country ' => 'code ' ])
410+ Expression::on (['country ' => 'code ' ]),
411+ flow_context (config ())->entryFactory (),
408412 );
409413
410414 self ::assertEquals (
@@ -430,7 +434,8 @@ public function test_left_join_with_the_duplicated_columns() : void
430434 row (int_entry ('id ' , 101 ), str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
431435 row (int_entry ('id ' , 102 ), str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
432436 ),
433- Expression::on (['country ' => 'code ' ], '' )
437+ Expression::on (['country ' => 'code ' ], '' ),
438+ flow_context (config ())->entryFactory (),
434439 );
435440 }
436441
@@ -448,7 +453,8 @@ public function test_left_join_without_prefix() : void
448453 row (str_entry ('country_code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
449454 row (str_entry ('country_code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
450455 ),
451- Expression::on (['country_code ' => 'country_code ' ])
456+ Expression::on (['country_code ' => 'country_code ' ]),
457+ flow_context (config ())->entryFactory (),
452458 );
453459
454460 self ::assertEquals (
@@ -476,7 +482,8 @@ public function test_right_join() : void
476482 row (str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
477483 row (str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
478484 ),
479- Expression::on (['country ' => 'code ' ], 'joined_ ' )
485+ Expression::on (['country ' => 'code ' ], 'joined_ ' ),
486+ flow_context (config ())->entryFactory (),
480487 );
481488
482489 self ::assertEquals (
@@ -501,7 +508,8 @@ public function test_right_join_empty() : void
501508
502509 $ joined = $ left ->joinRight (
503510 rows (),
504- Expression::on (['country ' => 'code ' ])
511+ Expression::on (['country ' => 'code ' ]),
512+ flow_context (config ())->entryFactory (),
505513 );
506514
507515 self ::assertEquals (
@@ -520,7 +528,8 @@ public function test_right_join_to_empty() : void
520528 row (str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
521529 row (str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
522530 ),
523- Expression::on (['country ' => 'code ' ], 'joined_ ' )
531+ Expression::on (['country ' => 'code ' ], 'joined_ ' ),
532+ flow_context (config ())->entryFactory (),
524533 );
525534
526535 self ::assertEquals (
@@ -551,7 +560,8 @@ public function test_right_join_with_duplicated_entry_names() : void
551560 row (int_entry ('id ' , 102 ), str_entry ('code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
552561 row (int_entry ('id ' , 103 ), str_entry ('code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
553562 ),
554- Expression::on (['country ' => 'code ' ], '' )
563+ Expression::on (['country ' => 'code ' ], '' ),
564+ flow_context (config ())->entryFactory (),
555565 );
556566 }
557567
@@ -570,7 +580,8 @@ public function test_right_join_without_prefix() : void
570580 row (str_entry ('country_code ' , 'US ' ), str_entry ('name ' , 'United States ' )),
571581 row (str_entry ('country_code ' , 'GB ' ), str_entry ('name ' , 'Great Britain ' )),
572582 ),
573- Expression::on (['country_code ' => 'country_code ' ])
583+ Expression::on (['country_code ' => 'country_code ' ]),
584+ flow_context (config ())->entryFactory (),
574585 );
575586
576587 self ::assertEquals (
0 commit comments