Skip to content

Commit

Permalink
Fix: Code formatted and correct return type of one test
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lapinski committed Feb 20, 2025
1 parent 0c4d571 commit c2c7f04
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
24 changes: 12 additions & 12 deletions src/core/etl/tests/Flow/ETL/Tests/Unit/Function/IndexOfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ public function test_index_of() : void
);
}

public function test_needle_null_index_of_returns_false() : void
{
self::assertFalse(
ref('str')->indexOf(ref('needle'))->eval(
row(
str_entry('str', 'x'),
str_entry('needle', null)
)
)
);
}

public function test_returns_method_returns_string_int() : void
{
$indexOf = new IndexOf('Abba', 'b', offset: 3);
Expand All @@ -62,16 +74,4 @@ public function test_string_null_index_of_returns_false() : void
)
);
}

public function test_needle_null_index_of_returns_false() : void
{
self::assertFalse(
ref('str')->indexOf(ref('needle'))->eval(
row(
str_entry('str', 'x'),
str_entry('needle', null)
)
)
);
}
}
22 changes: 11 additions & 11 deletions src/core/etl/tests/Flow/ETL/Tests/Unit/Function/IsUtf8Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@

final class IsUtf8Test extends FlowTestCase
{
public function test_is_utf8_returns_null() : void
{
self::assertNull(
ref('str')->isUtf8()->eval(
row(
str_entry('str', null),
)
)
);
}

public function test_is_utf_8() : void
{
self::assertTrue(
Expand All @@ -36,15 +47,4 @@ public function test_returns_method_returns_string_boolean() : void

self::assertTrue($returnType->isEqual(type_boolean()));
}

public function test_is_utf8_returns_null() : void
{
self::assertNull(
ref('str')->isUtf8()->eval(
row(
str_entry('str', null),
)
)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

namespace Flow\ETL\Tests\Unit\Function;

use Flow\ETL\Function\StringAfter;
use function Flow\ETL\DSL\row;
use function Flow\ETL\DSL\{ref, str_entry, type_string};
use Flow\ETL\Function\StringTitle;
use Flow\ETL\Function\{StringAfter};
use Flow\ETL\PHP\Type\Type;
use Flow\ETL\Tests\FlowTestCase;

Expand Down Expand Up @@ -61,7 +60,7 @@ public function test_string_after_including_needle() : void

public function test_string_after_returns_null() : void
{
self::assertFalse(
self::assertNull(
ref('str')->stringAfter('x')->eval(
row(
str_entry('str', null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Flow\ETL\Tests\Unit\Function;

use Flow\ETL\Function\StringFold;
use Flow\ETL\PHP\Type\Type;
use function Flow\ETL\DSL\row;
use function Flow\ETL\DSL\{ref, str_entry, type_string};
use Flow\ETL\Function\StringFold;
use Flow\ETL\PHP\Type\Type;
use Flow\ETL\Tests\FlowTestCase;

final class StringFoldTest extends FlowTestCase
Expand All @@ -21,6 +21,7 @@ public function test_returns_method_returns_string_type() : void

self::assertTrue($returnType->isEqual(type_string()));
}

public function test_string_folded() : void
{
self::assertSame(
Expand Down
22 changes: 11 additions & 11 deletions src/core/etl/tests/Flow/ETL/Tests/Unit/Function/StringStyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ public function test_string_style_lower() : void
);
}

public function test_string_style_returns_null() : void
{
self::assertNull(
ref('str')->stringStyle(StringStyles::LOWER)->eval(
row(
str_entry('str', null),
)
)
);
}

public function test_string_style_snake() : void
{
self::assertSame(
Expand Down Expand Up @@ -85,15 +96,4 @@ public function test_string_style_upper() : void
)
);
}

public function test_string_style_returns_null() : void
{
self::assertNull(
ref('str')->stringStyle(StringStyles::LOWER)->eval(
row(
str_entry('str', null),
)
)
);
}
}

0 comments on commit c2c7f04

Please sign in to comment.