createClientException example

$response = $frwController->frwStart($this->createContext());

        static::assertSame(SymfonyResponse::HTTP_OK, $response->getStatusCode());
    }

    public function testTryingToStartFrwFails(): void
    {
        $exceptionMessage = 'frwService::frwStart failed';
        $this->firstRunWizardService->expects(static::once())
            ->method('startFrw')
            ->willThrowException($this->createClientException($exceptionMessage));

        $frwController = new FirstRunWizardController(
            $this->firstRunWizardService,
            new StaticEntityRepository([]),
            new StaticEntityRepository([]),
        );

        static::expectException(StoreApiException::class);
        static::expectExceptionMessage($exceptionMessage);
        $frwController->frwStart($this->createContext());
    }

    
Home | Imprint | This part of the site doesn't use cookies.