示例#1
0
 /**
  * @covers Ringo\PhpRedmon\Model\Instance::setLogs
  * @todo   Implement testSetLogs().
  */
 public function testSetLogs()
 {
     $logs = array(new Log());
     $logs = new ArrayCollection($logs);
     $this->object->setLogs($logs);
     $this->assertEquals($logs, $this->object->getLogs());
 }
 /**
  * Remove an instance
  * 
  * @param Instance $instance
  */
 public function remove(Instance $instance)
 {
     $key = $this->getHash() . $instance->getId();
     if ($this->getFileManager()->has($key)) {
         $this->getFileManager()->delete($key);
     }
 }
 /**
  * Connect redis client to the server
  */
 protected function connect()
 {
     $this->client = new Client(array('host' => $this->instance->getHost(), 'port' => $this->instance->getPort()));
 }