createMock(PluginSettingsService::class); $settings->expects($this->once()) ->method('get') ->with('sirsoft-pay_nicepayments', 'is_test_mode', true) ->willReturn(true); $this->app->instance(PluginSettingsService::class, $settings); $admin = $this->createAdminUser(['sirsoft-ecommerce.settings.read']); $response = $this->actingAs($admin) ->getJson('/api/plugins/sirsoft-pay_nicepayments/admin/settings/test-mode-status'); $response->assertOk() ->assertJsonPath('data.is_test_mode', true); $data = $response->json('data'); $this->assertArrayNotHasKey('test_mid', $data); $this->assertArrayNotHasKey('live_mid', $data); } }