- Create StripeService: webhook sync, signature verification, save secret to .env.local - Create StripeWebhookController with signature verification (400 on invalid) - Create stripe:sync command to auto-create webhook endpoint via Stripe API - Webhook listens to all events (configurable later) - Save webhook secret automatically to .env.local on creation - Add stripeAccountId field to User entity for Stripe Connect + migration - Tests: StripeServiceTest (5), StripeWebhookControllerTest (2), StripeSyncCommandTest (1), UserTest updated Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
538 B
PHP
20 lines
538 B
PHP
<?php
|
|
|
|
namespace App\Tests\Command;
|
|
|
|
use App\Command\StripeSyncCommand;
|
|
use App\Service\StripeService;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class StripeSyncCommandTest extends TestCase
|
|
{
|
|
public function testCommandIsConfigured(): void
|
|
{
|
|
$stripeService = $this->createMock(StripeService::class);
|
|
$command = new StripeSyncCommand($stripeService);
|
|
|
|
self::assertSame('stripe:sync', $command->getName());
|
|
self::assertSame('Create or update the Stripe webhook endpoint', $command->getDescription());
|
|
}
|
|
}
|