public function testThatWeCanConnectToSlaveAndInspectTheRole() { $slave = new Client('127.0.0.1', '6380', new Client\Adapter\PhpRedisClientAdapter()); $this->assertEquals(Client::ROLE_SLAVE, $slave->getRole(), 'The slave should be identified with that type'); $this->assertTrue($slave->isSlave(), 'Verify the slave is a slave'); $slave = new Client('127.0.0.1', '6379', new Client\Adapter\PhpRedisClientAdapter()); $this->assertEquals(Client::ROLE_SLAVE, $slave->getRole(), 'The slave should be identified with that type'); $this->assertTrue($slave->isSlave(), 'Verify the slave is a slave'); }
public function testThatWeCanConnectToSlaveAndInspectTheRole() { $slave = new Client('192.168.50.41', '6379', null, Client::TYPE_REDIS); $this->assertEquals(Client::ROLE_SLAVE, $slave->getRoleType(), 'The slave should be identified with that type'); $this->assertTrue($slave->isSlave(), 'Verify the slave is a slave'); }