Step 00 — Squelette + intégration naïve
3 Bounded Contexts (Sales, Invoicing, LegacyFulfillment) avec : - Domaines complets (agrégats, VOs, événements, invariants) - Couche application (commands, queries, ports) - Infrastructure in-memory (repos, gateway fake) - Controllers HTTP Symfony - Couplage naïf synchrone entre BC via NaiveSalesEventPublisher - 20 tests unitaires et d'intégration passants
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace MiniShop\LegacyFulfillment\Infrastructure\Gateway;
|
||||
|
||||
use MiniShop\LegacyFulfillment\Application\Port\LegacyFulfillmentGateway;
|
||||
use MiniShop\LegacyFulfillment\Domain\Model\ShipmentRequest;
|
||||
|
||||
final class FakeLegacyFulfillmentGateway implements LegacyFulfillmentGateway
|
||||
{
|
||||
/** @var list<ShipmentRequest> */
|
||||
private array $sentRequests = [];
|
||||
|
||||
public function sendShipmentRequest(ShipmentRequest $request): void
|
||||
{
|
||||
$this->sentRequests[] = $request;
|
||||
}
|
||||
|
||||
/** @return list<ShipmentRequest> */
|
||||
public function sentRequests(): array
|
||||
{
|
||||
return $this->sentRequests;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user