You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertEquals('case when `payment_status` = 1 then "Paid" else "Due" end', $caseQuery->toRaw());
30
30
}
31
31
32
-
publicfunctiontestCanGenerateComplexQuery()
32
+
publicfunctiontest_can_generate_complex_query()
33
33
{
34
34
/**
35
35
* @var QueryCaseBuilder $caseQuery
@@ -48,12 +48,12 @@ public function testCanGenerateComplexQuery()
48
48
$this->assertNotEmpty($caseQuery->else);
49
49
50
50
$this->assertEquals('case when `payment_status` = ? then ? when `payment_status` = ? then ? when `payment_status` <= ? then ? else ? end', $caseQuery->toSql());
$this->assertEquals('case when `payment_status` = 1 then "Paid" when `payment_status` = 2 then "Due" when `payment_status` <= 5 then "Canceled" else "Unknown" end', $caseQuery->toRaw());
@@ -72,12 +72,12 @@ public function testCanGenerateComplexQueryWithNullishTypes()
72
72
$this->assertNotEmpty($caseQuery->else);
73
73
74
74
$this->assertEquals('case when `payment_date` > ? then ? when `payment_date` = ? then ? when `payment_date` IS NULL then ? else ? end', $caseQuery->toSql());
$this->assertEquals('case when `payment_date` > 0 then "Paid" when `payment_date` = 0 then "Due" when `payment_date` IS NULL then "Canceled" else "Unknown" end', $caseQuery->toRaw());
@@ -96,12 +96,12 @@ public function testCanGenerateComplexQueryWithDotSeparatedColumns()
96
96
$this->assertNotEmpty($caseQuery->else);
97
97
98
98
$this->assertEquals('case when `Invoices`.`payment_status` = ? then ? when `Invoices`.`payment_status` = ? then ? when `Invoices`.`payment_status` <= ? then ? else ? end', $caseQuery->toSql());
$this->assertEquals('case when `Invoices`.`payment_status` = 1 then "Paid" when `Invoices`.`payment_status` = 2 then "Due" when `Invoices`.`payment_status` <= 5 then "Canceled" else "Unknown" end', $caseQuery->toRaw());
102
102
}
103
103
104
-
publicfunctiontestCanUseRawQueries()
104
+
publicfunctiontest_can_use_raw_queries()
105
105
{
106
106
/**
107
107
* @var QueryCaseBuilder $caseQuery
@@ -118,12 +118,12 @@ public function testCanUseRawQueries()
118
118
$this->assertNotEmpty($caseQuery->else);
119
119
120
120
$this->assertEquals('case when payment_status IN (1,2,3) then Paid when payment_status >= 4 then ? else ? end', $caseQuery->toSql());
0 commit comments