File tree Expand file tree Collapse file tree 5 files changed +39
-39
lines changed
src/core/etl/tests/Flow/ETL/Tests/Unit/Function Expand file tree Collapse file tree 5 files changed +39
-39
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,18 @@ public function test_index_of() : void
4242 );
4343 }
4444
45+ public function test_needle_null_index_of_returns_false () : void
46+ {
47+ self ::assertFalse (
48+ ref ('str ' )->indexOf (ref ('needle ' ))->eval (
49+ row (
50+ str_entry ('str ' , 'x ' ),
51+ str_entry ('needle ' , null )
52+ )
53+ )
54+ );
55+ }
56+
4557 public function test_returns_method_returns_string_int () : void
4658 {
4759 $ indexOf = new IndexOf ('Abba ' , 'b ' , offset: 3 );
@@ -62,16 +74,4 @@ public function test_string_null_index_of_returns_false() : void
6274 )
6375 );
6476 }
65-
66- public function test_needle_null_index_of_returns_false () : void
67- {
68- self ::assertFalse (
69- ref ('str ' )->indexOf (ref ('needle ' ))->eval (
70- row (
71- str_entry ('str ' , 'x ' ),
72- str_entry ('needle ' , null )
73- )
74- )
75- );
76- }
7777}
Original file line number Diff line number Diff line change 1212
1313final class IsUtf8Test extends FlowTestCase
1414{
15+ public function test_is_utf8_returns_null () : void
16+ {
17+ self ::assertNull (
18+ ref ('str ' )->isUtf8 ()->eval (
19+ row (
20+ str_entry ('str ' , null ),
21+ )
22+ )
23+ );
24+ }
25+
1526 public function test_is_utf_8 () : void
1627 {
1728 self ::assertTrue (
@@ -36,15 +47,4 @@ public function test_returns_method_returns_string_boolean() : void
3647
3748 self ::assertTrue ($ returnType ->isEqual (type_boolean ()));
3849 }
39-
40- public function test_is_utf8_returns_null () : void
41- {
42- self ::assertNull (
43- ref ('str ' )->isUtf8 ()->eval (
44- row (
45- str_entry ('str ' , null ),
46- )
47- )
48- );
49- }
5050}
Original file line number Diff line number Diff line change 44
55namespace Flow \ETL \Tests \Unit \Function ;
66
7- use Flow \ETL \Function \StringAfter ;
87use function Flow \ETL \DSL \row ;
98use function Flow \ETL \DSL \{ref , str_entry , type_string };
10- use Flow \ETL \Function \StringTitle ;
9+ use Flow \ETL \Function \{ StringAfter } ;
1110use Flow \ETL \PHP \Type \Type ;
1211use Flow \ETL \Tests \FlowTestCase ;
1312
@@ -61,7 +60,7 @@ public function test_string_after_including_needle() : void
6160
6261 public function test_string_after_returns_null () : void
6362 {
64- self ::assertFalse (
63+ self ::assertNull (
6564 ref ('str ' )->stringAfter ('x ' )->eval (
6665 row (
6766 str_entry ('str ' , null ),
Original file line number Diff line number Diff line change 44
55namespace Flow \ETL \Tests \Unit \Function ;
66
7- use Flow \ETL \Function \StringFold ;
8- use Flow \ETL \PHP \Type \Type ;
97use function Flow \ETL \DSL \row ;
108use function Flow \ETL \DSL \{ref , str_entry , type_string };
9+ use Flow \ETL \Function \StringFold ;
10+ use Flow \ETL \PHP \Type \Type ;
1111use Flow \ETL \Tests \FlowTestCase ;
1212
1313final class StringFoldTest extends FlowTestCase
@@ -21,6 +21,7 @@ public function test_returns_method_returns_string_type() : void
2121
2222 self ::assertTrue ($ returnType ->isEqual (type_string ()));
2323 }
24+
2425 public function test_string_folded () : void
2526 {
2627 self ::assertSame (
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ public function test_string_style_lower() : void
5656 );
5757 }
5858
59+ public function test_string_style_returns_null () : void
60+ {
61+ self ::assertNull (
62+ ref ('str ' )->stringStyle (StringStyles::LOWER )->eval (
63+ row (
64+ str_entry ('str ' , null ),
65+ )
66+ )
67+ );
68+ }
69+
5970 public function test_string_style_snake () : void
6071 {
6172 self ::assertSame (
@@ -85,15 +96,4 @@ public function test_string_style_upper() : void
8596 )
8697 );
8798 }
88-
89- public function test_string_style_returns_null () : void
90- {
91- self ::assertNull (
92- ref ('str ' )->stringStyle (StringStyles::LOWER )->eval (
93- row (
94- str_entry ('str ' , null ),
95- )
96- )
97- );
98- }
9999}
You can’t perform that action at this time.
0 commit comments