Skip to content

Commit c2c7f04

Browse files
author
f-lapinski
committed
Fix: Code formatted and correct return type of one test
1 parent 0c4d571 commit c2c7f04

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

src/core/etl/tests/Flow/ETL/Tests/Unit/Function/IndexOfTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff 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
}

src/core/etl/tests/Flow/ETL/Tests/Unit/Function/IsUtf8Test.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212

1313
final 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
}

src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StringAfterTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
namespace Flow\ETL\Tests\Unit\Function;
66

7-
use Flow\ETL\Function\StringAfter;
87
use function Flow\ETL\DSL\row;
98
use function Flow\ETL\DSL\{ref, str_entry, type_string};
10-
use Flow\ETL\Function\StringTitle;
9+
use Flow\ETL\Function\{StringAfter};
1110
use Flow\ETL\PHP\Type\Type;
1211
use 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),

src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StringFoldTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace Flow\ETL\Tests\Unit\Function;
66

7-
use Flow\ETL\Function\StringFold;
8-
use Flow\ETL\PHP\Type\Type;
97
use function Flow\ETL\DSL\row;
108
use function Flow\ETL\DSL\{ref, str_entry, type_string};
9+
use Flow\ETL\Function\StringFold;
10+
use Flow\ETL\PHP\Type\Type;
1111
use Flow\ETL\Tests\FlowTestCase;
1212

1313
final 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(

src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StringStyleTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)