AppUrlVerifier example

protected function setUp(): void
    {
        $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);

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