-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added and/or/andNot/orNot to ScalarFunctionsChain (#1378)
- Loading branch information
1 parent
6e51340
commit 39f3d51
Showing
7 changed files
with
87 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
src/core/etl/src/Flow/ETL/Function/CompositeScalarFunction.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/core/etl/tests/Flow/ETL/Tests/Unit/Function/LogicalFunctionsTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\ETL\Tests\Unit\Function; | ||
|
||
use function Flow\ETL\DSL\{int_entry, lit, ref, row}; | ||
use Flow\ETL\Tests\FlowTestCase; | ||
|
||
final class LogicalFunctionsTest extends FlowTestCase | ||
{ | ||
public function test_logical_operations() : void | ||
{ | ||
self::assertFalse(ref('id')->isEven()->andNot(ref('id')->equals(lit(1)))->eval(row(int_entry('id', 1)))); | ||
self::assertTrue(ref('id')->isOdd()->and(ref('id')->equals(lit(1)))->eval(row(int_entry('id', 1)))); | ||
self::assertTrue(ref('id')->isEven()->or(ref('id')->equals(lit(1)))->eval(row(int_entry('id', 1)))); | ||
self::assertFalse(ref('id')->isOdd()->andNot(ref('id')->equals(lit(1)))->eval(row(int_entry('id', 1)))); | ||
} | ||
} |