예제 #1
0
 public function testSendMetric()
 {
     $mock = $this->getMockMetric();
     $mock->expects($this->once())->method('getMetadataPacket')->will($this->returnValue('metadata'));
     $mock->expects($this->once())->method('getValuePacket')->will($this->returnValue('value'));
     $socket = new Socket('127.0.0.1', 32131, []);
     $socket->sendMetric($mock, 0.0);
 }