getActiveNode() public method

public getActiveNode ( ) : Node
return Basho\Riak\Node
Esempio n. 1
0
 /**
  * Outputs the caller method name so that accidental connections can be noticed
  *
  * Using echo() is safe, since fixtures should be enabled on the command line while running PHPUnit only!
  *
  * @return BashoRiak\Node
  */
 public function getActiveNode()
 {
     if ($this->usesFixtures()) {
         echo ' [RIAK CONNECT BY "' . $this->getFixtureCaller(8) . '"] ';
     }
     return parent::getActiveNode();
 }
Esempio n. 2
0
 public function testPickNode()
 {
     $nodes = static::getCluster();
     $riak = new Riak($nodes);
     $this->assertNotFalse($riak->getActiveNodeIndex());
     $this->assertInstanceOf('Basho\\Riak\\Node', $riak->getActiveNode());
 }