|
|
@@ -141,6 +141,33 @@ class OperationExchangeListTest extends TestCase
|
|
|
$this->assertSame(['third:1', 'self:sport', 'self:lottery'], array_column($this->rows()['100']['played_games'], 'category'));
|
|
|
}
|
|
|
|
|
|
+ public static function sourcesWithoutFakeFlag(): array
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ 'lottery' => ['lhc_order', 'self:lottery'],
|
|
|
+ 'sport' => ['sport_order', 'self:sport'],
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ #[DataProvider('sourcesWithoutFakeFlag')]
|
|
|
+ public function test_missing_optional_fake_flag_does_not_break_the_list_or_date_filters(string $table, string $category): void
|
|
|
+ {
|
|
|
+ DB::statement('ALTER TABLE bot_' . $table . ' DROP COLUMN is_faker');
|
|
|
+ $this->order($table);
|
|
|
+ $this->order($table, '200', at: '2026-11-03 23:59:59');
|
|
|
+ $this->order($table, '300');
|
|
|
+ $this->funds('充值', '100');
|
|
|
+ $this->funds('提现', '-25');
|
|
|
+
|
|
|
+ $rows = $this->rows(['start_time' => '2026-11-04', 'end_time' => '2026-11-04', 'sort_field' => 'recharge']);
|
|
|
+ $this->assertSame(['100', '200'], array_column($rows, 'member_id'));
|
|
|
+ $this->assertSame([$category], array_column($rows['100']['played_games'], 'category'));
|
|
|
+ $this->assertSame('75.00', $rows['100']['withdraw_recharge_difference']);
|
|
|
+ $this->assertSame([], $rows['200']['played_games']);
|
|
|
+ $this->assertArrayNotHasKey('300', $rows);
|
|
|
+ $this->assertSame([$category], array_column($this->rows()['200']['played_games'], 'category'));
|
|
|
+ }
|
|
|
+
|
|
|
public function test_third_party_identity_supports_user_id_only_and_does_not_mix_members(): void
|
|
|
{
|
|
|
$this->order('third_game_orders', extra: ['user_id' => 1, 'member_id' => null, 'game_type' => 1]);
|