'https://ladill.com/api/billing', 'billing.api_key' => 'give-test']); $owner = User::factory()->create(['public_id' => 'usr_give_policy']); PaymentGatewaySetting::create([ 'owner_ref' => $owner->public_id, 'provider' => 'paystack', 'public_key' => 'pk_test_saved', 'secret_key' => 'sk_test_saved', 'is_active' => true, ]); Http::fake(['*/suite-entitlements*' => Http::response(['data' => [ 'effective_plan' => 'enterprise', 'features' => ['custom_payment_gateway'], ]])]); $this->assertFalse(app(PlanEntitlementService::class)->canUseCustomPaymentGateway($owner)); $this->assertFalse(app(MerchantGatewayService::class)->shouldUseOwnerGateway($owner)); } }