getActiveNode() public method

public getActiveNode ( ) : Node
return Basho\Riak\Node
コード例 #1
0
ファイル: Riak.php プロジェクト: lastzero/test-tools
 /**
  * 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();
 }
コード例 #2
0
ファイル: RiakTest.php プロジェクト: lastzero/riak-php-client
 public function testPickNode()
 {
     $nodes = static::getCluster();
     $riak = new Riak($nodes);
     $this->assertNotFalse($riak->getActiveNodeIndex());
     $this->assertInstanceOf('Basho\\Riak\\Node', $riak->getActiveNode());
 }