You are here

public function RedisMock::connect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/Profiler/Mock/RedisMock.php \Symfony\Component\HttpKernel\Tests\Profiler\Mock\RedisMock::connect()

Add a server to connection pool.

Parameters

string $host:

int $port:

float $timeout:

Return value

bool

File

vendor/symfony/http-kernel/Tests/Profiler/Mock/RedisMock.php, line 33

Class

RedisMock
RedisMock for simulating Redis extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function connect($host, $port = 6379, $timeout = 0) {
  if ('127.0.0.1' == $host && 6379 == $port) {
    $this->connected = true;
    return true;
  }
  return false;
}