AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Tests;
  3. use App\Billing\SubscriptionGateway;
  4. use App\Commerce\Payments\PaymentGateway;
  5. use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
  6. use Laravel\Fortify\Features;
  7. use Tests\Support\FakeGateway;
  8. use Tests\Support\FakeSubscriptionGateway;
  9. abstract class TestCase extends BaseTestCase
  10. {
  11. protected function setUp(): void
  12. {
  13. parent::setUp();
  14. // No test may ever talk to the real payment service. Tests that care replace these with their own.
  15. $this->app->instance(PaymentGateway::class, new FakeGateway);
  16. $this->app->instance(SubscriptionGateway::class, new FakeSubscriptionGateway);
  17. }
  18. protected function skipUnlessFortifyHas(string $feature, ?string $message = null): void
  19. {
  20. if (! Features::enabled($feature)) {
  21. $this->markTestSkipped($message ?? "Fortify feature [{$feature}] is not enabled.");
  22. }
  23. }
  24. }