public function RedisMock::connect in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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\MockCode
public function connect($host, $port = 6379, $timeout = 0) {
if ('127.0.0.1' == $host && 6379 == $port) {
$this->connected = true;
return true;
}
return false;
}