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
42
42
);
43
43
}
44
44
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
+
45
57
public function test_returns_method_returns_string_int () : void
46
58
{
47
59
$ indexOf = new IndexOf ('Abba ' , 'b ' , offset: 3 );
@@ -62,16 +74,4 @@ public function test_string_null_index_of_returns_false() : void
62
74
)
63
75
);
64
76
}
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
- }
77
77
}
Original file line number Diff line number Diff line change 12
12
13
13
final class IsUtf8Test extends FlowTestCase
14
14
{
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
+
15
26
public function test_is_utf_8 () : void
16
27
{
17
28
self ::assertTrue (
@@ -36,15 +47,4 @@ public function test_returns_method_returns_string_boolean() : void
36
47
37
48
self ::assertTrue ($ returnType ->isEqual (type_boolean ()));
38
49
}
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
- }
50
50
}
Original file line number Diff line number Diff line change 4
4
5
5
namespace Flow \ETL \Tests \Unit \Function ;
6
6
7
- use Flow \ETL \Function \StringAfter ;
8
7
use function Flow \ETL \DSL \row ;
9
8
use function Flow \ETL \DSL \{ref , str_entry , type_string };
10
- use Flow \ETL \Function \StringTitle ;
9
+ use Flow \ETL \Function \{ StringAfter } ;
11
10
use Flow \ETL \PHP \Type \Type ;
12
11
use Flow \ETL \Tests \FlowTestCase ;
13
12
@@ -61,7 +60,7 @@ public function test_string_after_including_needle() : void
61
60
62
61
public function test_string_after_returns_null () : void
63
62
{
64
- self ::assertFalse (
63
+ self ::assertNull (
65
64
ref ('str ' )->stringAfter ('x ' )->eval (
66
65
row (
67
66
str_entry ('str ' , null ),
Original file line number Diff line number Diff line change 4
4
5
5
namespace Flow \ETL \Tests \Unit \Function ;
6
6
7
- use Flow \ETL \Function \StringFold ;
8
- use Flow \ETL \PHP \Type \Type ;
9
7
use function Flow \ETL \DSL \row ;
10
8
use function Flow \ETL \DSL \{ref , str_entry , type_string };
9
+ use Flow \ETL \Function \StringFold ;
10
+ use Flow \ETL \PHP \Type \Type ;
11
11
use Flow \ETL \Tests \FlowTestCase ;
12
12
13
13
final class StringFoldTest extends FlowTestCase
@@ -21,6 +21,7 @@ public function test_returns_method_returns_string_type() : void
21
21
22
22
self ::assertTrue ($ returnType ->isEqual (type_string ()));
23
23
}
24
+
24
25
public function test_string_folded () : void
25
26
{
26
27
self ::assertSame (
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ public function test_string_style_lower() : void
56
56
);
57
57
}
58
58
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
+
59
70
public function test_string_style_snake () : void
60
71
{
61
72
self ::assertSame (
@@ -85,15 +96,4 @@ public function test_string_style_upper() : void
85
96
)
86
97
);
87
98
}
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
- }
99
99
}
You can’t perform that action at this time.
0 commit comments