api('GET', 'questionnaires'); $this->assertLegacyAuthError($res, 401, 'Missing Bearer token'); } public function testAdminCanListQuestionnaires(): void { $this->loginAs(DatabaseFixture::ADMIN_USERNAME); $res = $this->api('GET', 'questionnaires'); $this->assertOk($res); $this->assertNotEmpty($res['body']['data']['questionnaires'] ?? []); } }