示例#1
0
 /**
  * @dataProvider dataStatistical
  */
 public function testStatisctiaclData($expectedStats, $mockData)
 {
     $graphite = $this->mockFactory->getGraphiteClientMock();
     $target = new Target($graphite, 'test.target', array(), array());
     $graphite->expects($this->once())->method('getData')->will($this->returnValue($mockData));
     $stats = $target->stats();
     $this->assertEquals($expectedStats, $stats);
 }
示例#2
0
 /**
  * @deprecated
  */
 public function getAvgTargetValue($target, $graphiteUrl, array $options, $nullAsZero = false)
 {
     $options['nullAsZero'] = (int) $nullAsZero;
     $target = new Target($this, $target, array(), $options);
     return $target->avg();
 }