/** * 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(); }
public function testPickNode() { $nodes = static::getCluster(); $riak = new Riak($nodes); $this->assertNotFalse($riak->getActiveNodeIndex()); $this->assertInstanceOf('Basho\\Riak\\Node', $riak->getActiveNode()); }