class FirstRunWizardServiceTest extends TestCase
{ private Context
$context;
protected function setUp(): void
{ $this->context =
new Context(new AdminApiSource(Uuid::
randomHex()));
} public function testTracksAndDispatchesEventWhenFrwIsStarted(): void
{ $firstRunWizardStartedEvent =
new FirstRunWizardStartedEvent(FrwState::
openState(),
$this->context
);
$eventDispatcher =
$this->
createMock(EventDispatcherInterface::
class);
$eventDispatcher->
expects(static::
once()) ->
method('dispatch'
) ->
with($firstRunWizardStartedEvent);
$trackingEventClient =
$this->
createMock(TrackingEventClient::
class);
$trackingEventClient->
expects(static::
once()) ->
method('fireTrackingEvent'
) ->
with('First Run Wizard started'
);