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
@@ -104,23 +107,105 @@ public function testAdditionalOperators()
104
107
105
108
publicfunctiontestParticipants()
106
109
{
110
+
$user1 = User::factory()->create();
111
+
$user2 = User::factory()->create();
112
+
$user3 = User::factory()->create();
113
+
107
114
$sql = $this->filter([
108
115
[
109
116
'subject' => ['type' => 'Participants'],
110
117
'operator' => 'in',
111
-
'value' => [1, 2, 3],
118
+
'value' => [$user1->id, $user2->id],
112
119
'or' => [
113
120
[
114
121
'subject' => ['type' => 'Participants'],
115
122
'operator' => '=',
116
-
'value' => 5,
123
+
'value' => $user3->id,
117
124
],
118
125
],
119
126
],
120
127
]);
121
128
122
129
$this->assertEquals(
123
-
"select * from `process_requests` where ((`id` in (select `process_request_id` from `process_request_tokens` where `element_type` in ('task', 'userTask', 'startEvent') and `user_id` in (1, 2, 3)) or (`id` in (select `process_request_id` from `process_request_tokens` where `element_type` in ('task', 'userTask', 'startEvent') and `user_id` = 5))))",
130
+
'select * from `process_requests` where (((' .
131
+
"`id` in (select `process_request_id` from `process_request_tokens` where `user_id` = {$user1->id} and `element_type` in ('task', 'userTask', 'startEvent'))) " .
132
+
"or (`id` in (select `process_request_id` from `process_request_tokens` where `user_id` = {$user2->id} and `element_type` in ('task', 'userTask', 'startEvent'))) " .
133
+
"or ((`id` in (select `process_request_id` from `process_request_tokens` where `user_id` = {$user3->id} and `element_type` in ('task', 'userTask', 'startEvent'))))))",
134
+
$sql
135
+
);
136
+
}
137
+
138
+
publicfunctiontestRequestStatus()
139
+
{
140
+
$sql = $this->filter([
141
+
[
142
+
'subject' => ['type' => 'Status'],
143
+
'operator' => 'in',
144
+
'value' => ['In Progress', 'Completed'],
145
+
],
146
+
]);
147
+
148
+
$this->assertEquals(
149
+
"select * from `process_requests` where ((`status` = 'ACTIVE') or (`status` = 'COMPLETED'))",
0 commit comments