master() public method

Get the information for a specific master
public master ( string $name ) : mixed
$name string
return mixed
Exemplo n.º 1
0
 public function testMaster()
 {
     $master = $this->sentinel->master($this->sentinelConfig->clustername);
     $this->assertInternalType('array', $master);
     $this->assertArrayHasKey(1, $master);
     $this->assertArrayHasKey(5, $master);
     $this->assertEquals($this->sentinelConfig->clustername, $master[1]);
     $this->assertEquals($this->redisConfig[0]['port'], $master[5]);
     $this->setExpectedException('CredisException', 'No such master with that name');
     $this->sentinel->master('non-existing-cluster');
 }