SymfonyRequest example

$this->guzzleMock = $this->createMock(Client::class);
        $this->connection = $this->createMock(Connection::class);
    }

    public function testAppUrlReachableReturnsTrueIfAppEnvIsNotProd(): void
    {
        $this->guzzleMock->expects(static::never())
            ->method('get');

        $verifier = new AppUrlVerifier($this->guzzleMock, $this->connection, 'dev', false);

        static::assertTrue($verifier->isAppUrlReachable(new SymfonyRequest()));
    }

    public function testAppUrlReachableReturnsTrueIfAppUrlCheckIsDisabled(): void
    {
        $this->guzzleMock->expects(static::never())
            ->method('get');

        $verifier = new AppUrlVerifier($this->guzzleMock, $this->connection, 'prod', true);

        static::assertTrue($verifier->isAppUrlReachable(new SymfonyRequest()));
    }

    
->method('getRecommendations')
            ->willReturn(new PluginRecommendationCollection([
                (new StorePluginStruct())->assign(['name' => $plugin1Name]),
            ]));

        $frwController = new FirstRunWizardController(
            $this->firstRunWizardService,
            $pluginRepository,
            $appRepository,
        );

        $response = $frwController->getRecommendations(new SymfonyRequest()$context);
        $responseData = $this->decodeJsonResponse($response);

        static::assertArrayHasKey('items', $responseData);
        static::assertArrayHasKey('total', $responseData);
    }

    public function testTryingToGetRecommendationsFails(): void
    {
        $context = $this->createContext();

        $pluginRepository = new StaticEntityRepository([
            
Home | Imprint | This part of the site doesn't use cookies.