public function testThatWeCanInspectTheRole() { $master = new Client('192.168.50.40', '6379', null, Client::TYPE_REDIS); $this->assertEquals(Client::ROLE_MASTER, $master->getRoleType(), 'The master should be identified with that type'); $this->assertTrue($master->isMaster(), 'Verify the master is a master'); }
public function testThatWeCanConnectToMasterAndInspectTheRole() { $master = new Client('127.0.0.1', '6381', new Client\Adapter\PhpRedisClientAdapter()); $this->assertEquals(Client::ROLE_MASTER, $master->getRole(), 'Incorrect role for master'); $this->assertTrue($master->isMaster(), 'Can not verify that master is a master'); }