Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 0fef6aa

Browse files
committed
Use case operator throughout tests
1 parent 4e937db commit 0fef6aa

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tests/Builder/Expression/ConvertOperatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testExample(): void
4343
Stage::project(
4444
totalPrice: Expression::switch(
4545
branches: [
46-
object(
46+
Expression::case(
4747
case: Expression::eq(
4848
Expression::type(
4949
Expression::fieldPath('convertedPrice'),
@@ -52,7 +52,7 @@ public function testExample(): void
5252
),
5353
then: 'NaN',
5454
),
55-
object(
55+
Expression::case(
5656
case: Expression::eq(
5757
Expression::type(
5858
Expression::fieldPath('convertedQty'),

tests/Builder/Expression/IsNumberOperatorTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,35 @@ public function testConditionallyModifyFieldsUsingIsNumber(): void
2828
then: Expression::fieldPath('grade'),
2929
else: Expression::switch(
3030
branches: [
31-
object(
31+
Expression::case(
3232
case: Expression::eq(
3333
Expression::fieldPath('grade'),
3434
'A',
3535
),
3636
then: 4,
3737
),
38-
object(
38+
Expression::case(
3939
case: Expression::eq(
4040
Expression::fieldPath('grade'),
4141
'B',
4242
),
4343
then: 3,
4444
),
45-
object(
45+
Expression::case(
4646
case: Expression::eq(
4747
Expression::fieldPath('grade'),
4848
'C',
4949
),
5050
then: 2,
5151
),
52-
object(
52+
Expression::case(
5353
case: Expression::eq(
5454
Expression::fieldPath('grade'),
5555
'D',
5656
),
5757
then: 1,
5858
),
59-
object(
59+
Expression::case(
6060
case: Expression::eq(
6161
Expression::fieldPath('grade'),
6262
'F',

tests/Builder/Expression/ToBoolOperatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public function testExample(): void
2222
Stage::addFields(
2323
convertedShippedFlag: Expression::switch(
2424
branches: [
25-
object(
25+
Expression::case(
2626
case: Expression::eq(
2727
Expression::fieldPath('shipped'),
2828
'false',
2929
),
3030
then: false,
3131
),
32-
object(
32+
Expression::case(
3333
case: Expression::eq(
3434
Expression::fieldPath('shipped'),
3535
'',

0 commit comments

Comments
 (0)