client = new Client( baseUrl: 'https://trust.test', adminApiKey: 'admin-key', userApiKey: 'user-key', ); Http::fake(['*' => Http::response(['data' => []], 200)]); }); it('lists campaigns', function () { $this->client->campaigns(); Http::assertSent(fn ($r) => str_contains($r->url(), '/api/campaigns/')); }); it('creates a campaign', function () { $this->client->createCampaign(['name' => 'Test Campaign', 'type' => 'recent_activity']); Http::assertSent(fn ($r) => $r->method() === 'POST' && str_contains($r->url(), '/api/campaigns')); }); it('manages notifications within campaigns', function () { $this->client->createNotification(['campaign_id' => 1, 'title' => 'New sale']); Http::assertSent(fn ($r) => $r->method() === 'POST' && str_contains($r->url(), '/api/notifications')); }); it('fetches statistics', function () { $this->client->statistics(); Http::assertSent(fn ($r) => str_contains($r->url(), '/api/statistics/')); });