| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace Tests\Unit;
- use App\Services\WorldCup\WorldCupReferralService;
- use Tests\TestCase;
- class WorldCupReferralServiceTest extends TestCase
- {
- public function test_first_deposit_one_hundred_twenty_rewards_sixty_each()
- {
- $service = new WorldCupReferralService();
- $reward = $service->calculateReward(12000);
- $this->assertSame(6000, $reward['reward_each']);
- $this->assertSame(12000, $reward['total_liability']);
- }
- public function test_first_deposit_three_hundred_caps_reward_at_one_hundred_each()
- {
- $service = new WorldCupReferralService();
- $reward = $service->calculateReward(30000);
- $this->assertSame(10000, $reward['reward_each']);
- $this->assertSame(20000, $reward['total_liability']);
- }
- public function test_invite_copy_matches_latest_frontend_requirement()
- {
- $service = new WorldCupReferralService();
- $copy = $service->getInviteCopy();
- $this->assertSame(
- 'When your friend makes their first deposit, you each get 50% of it (up to $100 each)',
- $copy['description']
- );
- $this->assertSame(
- 'Risk warning: Self-invites (same device/payment) and bulk or bot signups are banned — rewards frozen, permanent ban, clawback.',
- $copy['risk_warning']
- );
- }
- }
|