client = new Client( baseUrl: 'https://bio.test', adminApiKey: 'admin-key', userApiKey: 'user-key', ); Http::fake(['*' => Http::response(['data' => []], 200)]); }); it('lists links', function () { $this->client->links(); Http::assertSent(fn ($r) => str_contains($r->url(), '/api/links/')); }); it('creates a link', function () { $this->client->createLink(['url' => 'https://example.com', 'type' => 'link']); Http::assertSent(fn ($r) => $r->method() === 'POST' && str_contains($r->url(), '/api/links')); }); it('gets link statistics', function () { $this->client->linkStatistics(42); Http::assertSent(fn ($r) => str_contains($r->url(), '/api/statistics/42')); }); it('lists projects', function () { $this->client->projects(); Http::assertSent(fn ($r) => str_contains($r->url(), '/api/projects/')); }); it('creates QR codes', function () { $this->client->createQrCode(['name' => 'Test QR', 'link_id' => 1]); Http::assertSent(fn ($r) => $r->method() === 'POST' && str_contains($r->url(), '/api/qr-codes')); });